@wcauchois/program-builder > ProgramBuilder > customFlag

ProgramBuilder.customFlag() method

Add a required custom valued flag to the program.

Signature:
customFlag<K extends string, V>(name: string, options: INonNullValuedFlagOptions<K, V>, converter: Converter<V>): ExtendProgramBuilderWithRequired<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".
optionsINonNullValuedFlagOptions<K, V>See INonNullValuedFlagOptions.
converterConverter<V>A Converter capable of converting a string to the desired type.
Returns:

ExtendProgramBuilderWithRequired<T, K, V>