@wcauchois/program-builder > ProgramBuilder > customFlag
ProgramBuilder.customFlag() method
Add an optional custom valued flag to the program.
Signature:customFlag<K extends string, V>(name: string, options: INullableValuedFlagOptions<K, V>, converter: Converter<V>): ExtendProgramBuilderWithOptional<T, K, V>;
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 | INullableValuedFlagOptions<K, V> | See INullableValuedFlagOptions. |
converter | Converter<V> | A Converter capable of converting a string to the desired type. |
ExtendProgramBuilderWithOptional<T, K, V>