SchemaAST78
Constructors
anyconstProvides the singleton Any AST instance.bigIntconstProvides the singleton BigInt AST instance.booleanconstProvides the singleton Boolean AST instance.isPatternfunctionCreates a Filter that validates strings by running RegExp.test.neverconstProvides the singleton Never AST instance.numberconstProvides the singleton Number AST instance.objectKeywordconstProvides the singleton ObjectKeyword AST instance.stringconstProvides the singleton String AST instance.symbolconstProvides the singleton Symbol AST instance.unknownconstProvides the singleton Unknown AST instance.Models
AnyclassAST node representing the any type — every value matches.ArraysclassAST node for array-like types — both tuples and arrays.ASTtypeDiscriminated union of all AST node types.BaseclassRepresents the abstract base class for all AST node variants.BigIntclassAST node matching any bigint value.BooleanclassAST node matching any boolean value (true or false).ChecktypeA validation check — either a single Filter or a composite FilterGroup.CheckstypeNon-empty array of validation Check values attached to an AST node via Base.checks.ContextclassRepresents per-property metadata attached to AST nodes via Base.context.DeclarationclassAST node for user-defined opaque types with custom parsing logic.EncodingtypeA non-empty chain of Link values representing the transformation steps between a schema's decoded (type) form and its encoded (wire) form.EnumclassAST node representing a TypeScript enum.FilterclassRepresents a single validation check attached to an AST node.FilterGroupclassRepresents a composite validation check grouping multiple Check values.IndexSignatureclassRepresents an index signature entry within an Objects node.KeyValueCombinerclassRepresents a bidirectional merge strategy for index signature key-value pairs.LinkclassRepresents a single step in an Encoding chain.LiteralclassAST node matching an exact primitive value (string, number, boolean, or bigint).LiteralValuetypeThe set of primitive types that can appear as a Literal value.NeverclassAST node representing the never type — no value matches.NullclassAST node matching the null literal value.NumberclassAST node matching any number value (including NaN, Infinity, -Infinity).ObjectKeywordclassAST node matching the TypeScript object type — accepts objects, arrays, and functions (anything non-primitive and non-null).ObjectsclassAST node for object-like schemas, including structs and records.PropertySignatureclassRepresents a named property within an Objects node.StringclassAST node matching any string value.SuspendclassAST node for lazy/recursive schemas.SymbolclassAST node matching any symbol value.TemplateLiteralclassAST node representing a TypeScript template literal type (e.g.UndefinedclassAST node matching the undefined value.UnionclassAST node representing a union of schemas.UniqueSymbolclassAST node matching a specific unique symbol value.UnknownclassAST node representing the unknown type — every value matches.VoidclassAST node matching TypeScript void return-value semantics.Guards
isAnyconstNarrows an AST to Any.isArraysconstNarrows an AST to Arrays.isASTfunctionReturns true if the value is an AST node (any variant).isBigIntconstNarrows an AST to BigInt.isBooleanconstNarrows an AST to Boolean.isDeclarationconstNarrows an AST to Declaration.isEnumconstNarrows an AST to Enum.isLiteralconstNarrows an AST to Literal.isNeverconstNarrows an AST to Never.isNullconstNarrows an AST to Null.isNumberconstNarrows an AST to Number.isObjectKeywordconstNarrows an AST to ObjectKeyword.isObjectsconstNarrows an AST to Objects.isStringconstNarrows an AST to String.isSuspendconstNarrows an AST to Suspend.isSymbolconstNarrows an AST to Symbol.isTemplateLiteralconstNarrows an AST to TemplateLiteral.isUndefinedconstNarrows an AST to Undefined.isUnionconstNarrows an AST to Union.isUniqueSymbolconstNarrows an AST to UniqueSymbol.isUnknownconstNarrows an AST to Unknown.isVoidconstNarrows an AST to Void.Annotations
resolveconstReturns all annotations from the AST node.resolveAtconstReturns a single annotation value by key from the AST node.resolveDescriptionconstReturns the description annotation from the AST node, if set.resolveIdentifierconstReturns the identifier annotation from the AST node, if set.resolveTitleconstReturns the title annotation from the AST node, if set.Options
Predicates
Transforming
decodeTofunctionAttaches a Transformation to the to AST, making it decode from the from AST and encode back to it.flipconstSwaps the decode and encode directions of an AST's Encoding chain.optionalKeyfunctionMarks an AST node's property key as optional by setting Context.isOptional to true.toEncodedconstReturns the encoded (wire-format) AST by flipping and then stripping encodings.toTypeconstStrips all encoding transformations from an AST, returning the decoded (type-level) representation.