ResultSpec
ResultSpec =
string|object
Defined in: src/schema/index.ts:125
A node’s result type:
- the name of a binding — the node’s type is whatever that operand parsed as (polymorphic passthrough, e.g. resultType: “then”)
- an arktype string def (e.g. “boolean”)
- an arktype object def (e.g. { min: “number”, max: “number” })
- a def EMBEDDING binding names (e.g. “then | null”, { value: “acc” }) — resolved per-parse in a scope extended with the parsed operand types
Required for every node that CONSTRUCTS a result. The only exemption is a single-element passthrough pattern (e.g. [number()]), which forwards its child unchanged and therefore has nothing to declare.