Interface CLIArgumentType<ValueType>
interface CLIArgumentType<ValueType> {
description?: string;
autoComplete(
startsWith: string,
options: { argName: string; command?: string; cwd: string },
): string[] | Promise<string[]>;
parseValue(
arg: string,
options: { argName: string; command?: string },
): ValueType;
}
description?: string;
autoComplete(
startsWith: string,
options: { argName: string; command?: string; cwd: string },
): string[] | Promise<string[]>;
parseValue(
arg: string,
options: { argName: string; command?: string },
): ValueType;
}
Type Parameters
- ValueType
Index
Properties
Methods
Methods
Optionalauto Complete
parse Value
Parses a user-provided value. Throws CLISyntaxError. Required to allow typeinference to work.
Parameters
- arg: string
- options: { argName: string; command?: string }
Returns ValueType
Return possible autocomplete sugegestions. Incomplete suggestions (user should add more text) should end with a '*'. Returned values that do not match the supplied 'startsWith' are ignored
cwdis the current working directory, is filled in from WH 5.9+.