Schema provides runtime type validation, encoding/decoding, and type inference for TypeScript.
Basic Schemas
String
Number
Struct
Validation
decodeUnknown
Validates and decodes unknown input.decodeSync
Synchronously validates and decodes input, throwing on error.is
Type guard predicate.Encoding
encode
Encodes a value from Type to Encoded representation.encodeSync
Schema Definition
Schema Interface
A- The inferred TypeScript typeI- The encoded representation typeR- Context dependencies