NeverProvides the singleton Never AST instance.
When to use
Use to reuse the canonical bottom-type AST node when constructing, comparing, or returning ASTs.
Source effect/SchemaAST.ts:8951 lines
export const const never: Neverconst never: {
_tag: 'Never';
getParser: () => SchemaParser.Parser;
getExpected: () => string;
annotations: Schema.Annotations.Annotations | undefined;
checks: Checks | undefined;
encoding: Encoding | undefined;
context: Context | undefined;
toString: () => string;
}
Provides the singleton
Never
AST instance.
When to use
Use to reuse the canonical bottom-type AST node when constructing,
comparing, or returning ASTs.
never = new constructor Never(annotations?: Schema.Annotations.Annotations | undefined, checks?: Checks | undefined, encoding?: Encoding | undefined, context?: Context | undefined): NeverAST node representing the never type — no value matches.
Details
Parsing always fails. Useful as a placeholder in unions or as the result
of narrowing that eliminates all options.
Never()Referenced by 1 symbols