Interface CLIArgumentType<ValueType>
interface CLIArgumentType<ValueType> {
description?: string;
autoComplete?(
startsWith: string,
options: { argName: string; command?: string[]; cwd: string },
): readonly string[] | Promise<readonly string[]>;
parseValue(
arg: string,
options: { argName: string; command?: string[] },
): ValueType | Promise<ValueType>;
}
description?: string;
autoComplete?(
startsWith: string,
options: { argName: string; command?: string[]; cwd: string },
): readonly string[] | Promise<readonly string[]>;
parseValue(
arg: string,
options: { argName: string; command?: string[] },
): ValueType | Promise<ValueType>;
}
Type Parameters
- 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+.