Skip to content

FlagNegation

Negation settings for a boolean flag (set by .negatable()).

The negated spelling and the positive form are two spellings of ONE logical flag: they share duplicate policy, and the last CLI occurrence wins across both. The negated spelling is presence-only — --no-foo=x is rejected.

Signatures

ts
interface FlagNegation {}

Members

Properties

alias

Explicit negated spelling without the -- prefix (e.g. 'no-sandbox'). undefined synthesizes no-<flagName> wherever the flag name is known.

ts
alias: string | undefined;

hidden

Hide the negated spelling from help, completions, and suggestions.

ts
hidden: boolean;

See Also

Released under the MIT License.