Skip to content

ArgDefinition interface

Home > streplts > ArgDefinition

Structural definition specifying configuration and validation metadata for a command parameter.

Signature:

export interface ArgDefinition

Used by the completion and validation pipelines to assert bounds on runtime inputs, provide interactive visual arguments hints, and produce suggestion list arrays.

Property

Modifiers

Type

Description

choices?

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.

name

string

The unique identifier labeling the target positional command argument.

required

boolean

Flags whether execution fails immediately if this positional parameter is not filled.