ObjectKeywordAST node matching the TypeScript object type — accepts objects, arrays,
and functions (anything non-primitive and non-null).
Source effect/SchemaAST.ts:98311 lines
export class class ObjectKeywordclass ObjectKeyword {
_tag: 'ObjectKeyword';
getParser: () => SchemaParser.Parser;
getExpected: () => string;
annotations: Schema.Annotations.Annotations | undefined;
checks: Checks | undefined;
encoding: Encoding | undefined;
context: Context | undefined;
toString: () => string;
}
AST node matching the TypeScript object type — accepts objects, arrays,
and functions (anything non-primitive and non-null).
ObjectKeyword 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 ObjectKeyword._tag: "ObjectKeyword"_tag = "ObjectKeyword"
/** @internal */
ObjectKeyword.getParser(): SchemaParser.ParsergetParser() {
return function fromRefinement<T>(
ast: AST,
refinement: (input: unknown) => input is T
): SchemaParser.Parser
fromRefinement(this, import PredicatePredicate.isObjectKeyword)
}
/** @internal */
ObjectKeyword.getExpected(): stringgetExpected(): string {
return "object | array | function"
}
}Referenced by 3 symbols