BooleanAST node matching any boolean value (true or false).
Source effect/SchemaAST.ts:143011 lines
export class class Booleanclass Boolean {
_tag: 'Boolean';
getParser: () => SchemaParser.Parser;
getExpected: () => string;
annotations: Schema.Annotations.Annotations | undefined;
checks: Checks | undefined;
encoding: Encoding | undefined;
context: Context | undefined;
toString: () => string;
}
AST node matching any boolean value (true or false).
Boolean 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 Boolean._tag: "Boolean"_tag = "Boolean"
/** @internal */
Boolean.getParser(): SchemaParser.ParsergetParser() {
return function fromRefinement<T>(
ast: AST,
refinement: (input: unknown) => input is T
): SchemaParser.Parser
fromRefinement(this, import PredicatePredicate.isBoolean)
}
/** @internal */
Boolean.getExpected(): stringgetExpected(): string {
return "boolean"
}
}Referenced by 3 symbols