Skip to content

UserParserDef

User-facing parser definition: every field optional; type may be a plain string.

optional examples?: unknown[] | ((props, ctx) => unknown[])

Sample values for the version matrix’s parser probe.


optional type?: string | ((props, ctx) => string)

The TypeScript type in generated signatures (re-run mspacker gen after changing it).

optional macro(text, props, ctx): string

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

string

Props

ParserContext

string


optional serialize(value, props, ctx): string

The command text for a value.

unknown

Props

ParserContext

string


optional test(value, props, ctx): boolean

Whether a value fits this argument.

unknown

Props

ParserContext

boolean