Skip to content

Token

Token discriminated union.

The tokenizer produces these from raw argv strings. The parser then interprets them against a command schema.

Signatures

ts
type Token = { kind: "long-flag"; name: string; value: string | undefined; } | { chars: string; kind: "short-flags"; } | { kind: "positional"; value: string; } | { kind: "separator"; };

See Also

Released under the MIT License.