Skip to content

ParserDef

A command argument type: how it’s typed in TypeScript, recognized and written.

optional examples(props, ctx): unknown[]

Sample values for the version matrix’s parser probe.

Props

ParserContext

unknown[]


optional macro(text, props, ctx): string

How a macro argument (text is $(name)) is written; as-is when missing.

string

Props

ParserContext

string


serialize(value, props, ctx): string

The command text for a value. Throw to reject it with a message.

unknown

Props

ParserContext

string


test(value, props, ctx): boolean

Whether a value fits this argument (picks between arguments at the same place).

unknown

Props

ParserContext

boolean


type(props, ctx): string

The TypeScript type in generated signatures, e.g. "Selector".

Props

ParserContext

string