a compiled schema that allows various functions
the type that this schema validates
the type of the JTD schema that corresponds to this compiled schema
generate a random item that complies with this schema
const schema = nullable(boolean());const val: boolean | null = schema.fuzz(); Copy
const schema = nullable(boolean());const val: boolean | null = schema.fuzz();
guard for if the input complies with the schema
const schema = boolean();const val: unknown = // ...if (schema.guard(val)) { val satisfies boolean;} Copy
const schema = boolean();const val: unknown = // ...if (schema.guard(val)) { val satisfies boolean;}
produce the raw schema
const schema = nullable(boolean);const raw: { type: "boolean", nullable: true } = schema.schema(); Copy
const schema = nullable(boolean);const raw: { type: "boolean", nullable: true } = schema.schema();
a compiled schema that allows various functions