OptionDefinition interface
Home > streplts > OptionDefinition
OptionDefinition interface
Section titled “OptionDefinition interface”Structural definition specifying configurations for unordered option flags or switches.
Signature:
export interface OptionDefinitionProperties
Section titled “Properties”|
Property |
Modifiers |
Type |
Description |
|---|---|---|---|
|
string[] | ((typed: string, previousArgs: string[], context: any, globals: any) => string[]) | null |
(Optional) An static string array or a dynamic evaluation closure generating eligible autocomplete variations for the option’s value. | ||
|
string |
(Optional) A brief description of the option’s purpose, used in help documentation to inform users about its functionality. | ||
|
string |
The unique identifier labeling the target option flag, excluding prefix dashes. For example, “verbose” for a “—verbose” flag. | ||
|
string |
(Optional) Optional single-character alias serving as a shorthand for the option. For example, “v” for a “—verbose” flag. | ||
|
“boolean” | “string” |
Defines the expected data type for the option’s value, which can be either a boolean (for flags) or a string (for options that require a value). |