Schema
tcmts.core.schema.Schema · #2ydz7axl · type
export type Schema =
| { t: "any" }
| { t: "never" }
| { t: "string" }
| { t: "number" }
| { t: "boolean" }
| { t: "bigint" }
| { t: "null" }
| { t: "undefined" }
| { t: "date" }
| { t: "literal"; value: string | number | boolean }
| { t: "union"; of: Schema[] }
| { t: "array"; of: Schema }
| { t: "tuple"; of: Schema[]; optional: number; rest?: Schema }
| { t: "object"; props: Record<string, { s: Schema; optional: boolean }>; index?: Schema }
| { t: "map"; key: Schema; value: Schema }
| { t: "set"; of: Schema }
| { t: "ref"; id: number }
/** a type that can't arrive as plain data (functions, class instances): any argument is refused */
| { t: "unsendable"; what: string };
used by