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
Parameter | Type | Description |
---|---|---|
definition | ICommandLineFlagDefinition |
Returns:
Remarks
Example usage of a flag parameter:
example-tool --debug