Status: implemented
Besides the readers, a schema gives three outputs, each derived from the one declaration:
| Output | From a schema s |
|---|---|
| the TypeScript type | Ts<typeof s>, and printer()(s) as text |
| a JSON Schema, draft 2020-12 | toJsonSchema(s) |
a canonical form, with equal, cmp and subset | toData(s) |
- The TypeScript type:
Ts<>and the printer - JSON Schema:
toJsonSchema, and where it is lossy - The canonical data form:
toData, and comparing schemas as sets
ts, media/json/schema and data.