@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

ParameterTypeDescription
name
string
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".
optionsINullableValuedFlagOptions<K, V>See INullableValuedFlagOptions.
converterConverter<V>A Converter capable of converting a string to the desired type.
Returns:

ExtendProgramBuilderWithOptional<T, K, V>