Patch Changes
-
#2209
5d30853
Thanks @steffanek! - AddpickLiteral
to Schema so that we can pick values from a Schema literal as follows:import * as S from "@effect/schema/Schema"; const schema = S.literal("a", "b", "c").pipe(S.pickLiteral("a", "b")); // same as S.literal("a", "b") S.decodeUnknownSync(schema)("a"); // ok S.decodeUnknownSync(schema)("b"); // ok S.decodeUnknownSync(schema)("c"); /* Error: "a" | "b" ├─ Union member │ └─ Expected "a", actual "c" └─ Union member └─ Expected "b", actual "c" */
-
#2217
6e350ed
Thanks @gcanti! - JSONSchema: pruneUndefinedKeyword
if the property signature is marked as optional and contains a union that includesUndefinedKeyword
, closes #2068