Rush StackShopBlogEvents
Skip to main content

Home > @rushstack/ts-command-line > CommandLineParameterProvider > defineFlagParameter

CommandLineParameterProvider.defineFlagParameter() method

Defines a command-line switch whose boolean value is true if the switch is provided, and false otherwise.

Signature:

defineFlagParameter(definition: ICommandLineFlagDefinition): CommandLineFlagParameter;

Parameters

ParameterTypeDescription
definitionICommandLineFlagDefinition

Returns:

CommandLineFlagParameter

Remarks

Example usage of a flag parameter:

example-tool --debug