@wcauchois/program-builder > ProgramBuilder > flag
ProgramBuilder.flag() method
Add a boolean-valued flag to the program (sometimes known as a "switch").
Signature:flag<K extends string>(name: string, options: IBooleanFlagOptions<K>): ExtendProgramBuilderWithRequired<T, K, boolean>;
Parameters
Parameter | Type | Description |
---|---|---|
name |
| The name for the flag, including leading dashes. Multiple alternative names may be specified by separating them within the string by commas. For example, "-i,--input". |
options | IBooleanFlagOptions<K> | See IBooleanFlagOptions. |
ExtendProgramBuilderWithRequired<T, K, boolean>