UnknownProvides the singleton Unknown AST instance.
When to use
Use when you need the reusable AST singleton for a schema node that accepts every value while keeping parsed values opaque.
Source effect/SchemaAST.ts:9711 lines
export const const unknown: Unknownconst unknown: {
_tag: 'Unknown';
getParser: () => SchemaParser.Parser;
getExpected: () => string;
annotations: Schema.Annotations.Annotations | undefined;
checks: Checks | undefined;
encoding: Encoding | undefined;
context: Context | undefined;
toString: () => string;
}
Provides the singleton
Unknown
AST instance.
When to use
Use when you need the reusable AST singleton for a schema node that accepts
every value while keeping parsed values opaque.
unknown = new constructor Unknown(annotations?: Schema.Annotations.Annotations | undefined, checks?: Checks | undefined, encoding?: Encoding | undefined, context?: Context | undefined): UnknownAST node representing the unknown type — every value matches.
Details
Unlike
Any
, this is type-safe: the parsed result is typed as
unknown rather than any.
Unknown()Referenced by 1 symbols