Skip to content

ResultedBuilder

Defined in: src/schema/index.ts:394

Builder state after .result(): optionally attach .eval() — its return type is checked against the declared result.

TPattern extends readonly PatternSchema[]

TResultType extends ResultSpec

readonly ~pattern: TPattern

Defined in: src/schema/index.ts:398


readonly ~resultType: TResultType

Defined in: src/schema/index.ts:399


readonly ~eval: undefined

Defined in: src/schema/index.ts:400

eval(fn): EvaledBuilder<TPattern, TResultType>

Defined in: src/schema/index.ts:408

Attach the node’s evaluation function. Bindings arrive as MEMOIZED THUNKS (evaluation is uniformly lazy — call a binding to evaluate it; untaken branches never run). The return type is checked against the declared result.

(bindings) => EvalReturn<TResultType, TPattern>

EvaledBuilder<TPattern, TResultType>