CompiledRule
CompiledRule<
TGrammar,TInput,TSchema,$> =stringextendsTInput?Type<(In) =>Out<unknown>> :EvaluateResult<TGrammar,TInput,TSchema,$> extends infer R ? [R] extends [boolean] ?Type<InferValues<TSchema,$>> :Type<(In) =>Out<R>> :never
Defined in: src/createParser.ts:115
The arktype Type produced by parser.compile():
- a rule with boolean output is a PREDICATE — the Type validates the values object and rejects when the rule evaluates false (values in, values out)
- any other rule is a MORPH — values in, evaluated result out
- dynamic (non-literal) input: morph to unknown; the runtime decides
Type Parameters
Section titled “Type Parameters”TGrammar
Section titled “TGrammar”TGrammar extends Grammar
TInput
Section titled “TInput”TInput extends string
TSchema
Section titled “TSchema”TSchema extends SchemaShape
$
$ extends object = { }