@wcauchois/program-builder > ProgramBuilder > optionalArg

ProgramBuilder.optionalArg() method

Add an optional positional argument to the program.

Signature:
optionalArg<K extends string>(dest: K, options?: IPositionalArgumentMetadata): ExtendProgramBuilderWithOptional<T, K, string>;

Parameters

ParameterTypeDescription
dest
K
The destination key into which the argument value will be stored.
options
IPositionalArgumentMetadata
See IPositionalArgumentMetadata.
Returns:

ExtendProgramBuilderWithOptional<T, K, string>