CommandArgDefinition
Type Alias: CommandArgDefinition
CommandArgDefinition =
object
Defined in: definition.ts:303
Definition of a single CLI argument for a CommandDefinition.
Generated by the compiler from method parameter analysis:
typefrom TypeScript type annotationdefaultfrom parameter initializerrequiredwhen no default and no?modifieralias,description,deprecatedfrom JSDoc tags on the parameter
Example
{
"type": "number",
"default": 18080,
"alias": "p",
"description": "Port to listen on"
}
Properties
alias?
optionalalias?:string
Defined in: definition.ts:323
Single-character alias for the flag (e.g., "p" for --port).
Extracted from the @alias JSDoc tag on the parameter.
default?
optionaldefault?:any
Defined in: definition.ts:313
Default value from the method parameter initializer. Omitted if the parameter has no default.
deprecated?
optionaldeprecated?:string
Defined in: definition.ts:333
Deprecation message. When present, the CLI warns users that
this flag is deprecated. Extracted from the @deprecated JSDoc tag.
description?
optionaldescription?:string
Defined in: definition.ts:328
Help text displayed in --help output for this argument.
Extracted from the @description JSDoc tag on the parameter.
required?
optionalrequired?:boolean
Defined in: definition.ts:318
true if the parameter has no default value and no ? modifier,
meaning the user must provide this argument. Omitted when false.
type
type:
"string"|"number"|"boolean"
Defined in: definition.ts:308
The argument type, determining how the CLI parses the value. Mapped from the TypeScript type annotation on the method parameter.