ParserDef
A command argument type: how it’s typed in TypeScript, recognized and written.
Methods
Section titled “Methods”examples()?
Section titled “examples()?”
optionalexamples(props,ctx):unknown[]
Sample values for the version matrix’s parser probe.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”unknown[]
macro()?
Section titled “macro()?”
optionalmacro(text,props,ctx):string
How a macro argument (text is $(name)) is written; as-is when missing.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”string
serialize()
Section titled “serialize()”serialize(
value,props,ctx):string
The command text for a value. Throw to reject it with a message.
Parameters
Section titled “Parameters”unknown
Returns
Section titled “Returns”string
test()
Section titled “test()”test(
value,props,ctx):boolean
Whether a value fits this argument (picks between arguments at the same place).
Parameters
Section titled “Parameters”unknown
Returns
Section titled “Returns”boolean
type()
Section titled “type()”type(
props,ctx):string
The TypeScript type in generated signatures, e.g. "Selector".
Parameters
Section titled “Parameters”Returns
Section titled “Returns”string