ConstEscape hatch: builds a schema from a type guard.
A union of literal values; the output type narrows to the union.
Accepts null in addition to the inner schema.
VS Code settings commonly use "type": ["string", "null"] with a null
default to mean "unset", which s.optional (which admits undefined)
does not cover.
Accepts undefined in addition to the inner schema.
A string-keyed record with uniformly-typed values.
Keys come from the input, which for a record is the whole point — and
JSON.parse produces __proto__ as a genuine own property, so a record
built from parsed JSON can carry one. See defineOwn in foundation/internal/record.ts for why that key
is not written with output[key] = ….
Passes any value through unchanged.
Built-in schema builders. Dependency-free; supply any synchronous Standard Schema implementation through StandardSchemaV1 when more expressive validation or transformation is needed.
Composite builders stop at the first issue and prefix its path.
objectprojects the declared shape and does not copy unknown properties. These are intentionally small defaults, not a replacement for a full schema library.