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.
Source effect/SchemaAST.ts:86911 lines
export class class Neverclass Never {
_tag: 'Never';
getParser: () => SchemaParser.Parser;
getExpected: () => string;
annotations: Schema.Annotations.Annotations | undefined;
checks: Checks | undefined;
encoding: Encoding | undefined;
context: Context | undefined;
toString: () => string;
}
AST 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 extends class BaseRepresents the abstract base class for all
AST
node variants.
Details
Every AST node extends Base and inherits these fields:
annotations — user-supplied metadata (identifier, title, description,
arbitrary keys).
checks — optional
Checks
for post-type-match validation.
encoding — optional
Encoding
chain for type ↔ wire
transformations.
context — optional
Context
for per-property metadata.
Subclasses add a _tag discriminant and variant-specific data.
Base {
readonly Never._tag: "Never"_tag = "Never"
/** @internal */
Never.getParser(): SchemaParser.ParsergetParser() {
return function fromRefinement<T>(
ast: AST,
refinement: (input: unknown) => input is T
): SchemaParser.Parser
fromRefinement(this, import PredicatePredicate.isNever)
}
/** @internal */
Never.getExpected(): stringgetExpected(): string {
return "never"
}
}Referenced by 3 symbols