We nearly have all js primitives. Number, bigint (added in #1), string, undefined and null. there is only symbol missing. So add that and move undefined and null to simple/ folder.
add null and undefined
update to version 0.3.0
removed undefinedSchema since it is not very useful and better expressed by optional. Also the undefined type is not compatible to json schema
Merge pull request #19 from spaceteams/add-null-and-undefined
add null and undefined
update to version 0.3.0
removed undefinedSchema since it is not very useful and better expressed by optional. Also the undefined type is not compatible to json schema
add null and undefined
add null and undefined
add null and undefined
add null and undefined
add null and undefined
symbol can be expressed as a literal and should not be its own schema.
link to license on shield
and simplify discrimated union example
Merge pull request #18 from spaceteams/shields
link to license on shield
and simplify discrimated union example
and simplify discrimated union example
link to license on shield
and simplify discrimated union example
add some shields
Merge pull request #17 from spaceteams/shields
add some shields
add merge operator
Merge pull request #16 from spaceteams/merge
add merge operator
Currently omit only works on object types. Doing something like
const A = object({ name: nonEmptyString(string()) });
const B = object({ id: nonEmptyString(string()) });
const AandB = and(A, B);
const Aagain = omit(AandB, "id");
fails because AandB
does not have the needed structure.
add merge operator
Zod supports Discriminated unions and we could too.
add discriminated unions
Merge pull request #15 from spaceteams/discriminated-unions
add discriminated unions