Skip to content

ArrayFlagDefinition ​

Definition of an array flag.

Signatures ​

ts
interface ArrayFlagDefinition extends FlagDefinitionBase {}

Members ​

Properties ​

aggregateStandard ​

Standard Schema v1 validator applied to a completed collection.

ts
aggregateStandard?: StandardSchemaV1<unknown, unknown>;

aliases ​

Short/long aliases as bare names or FlagAlias records.

ts
aliases?: readonly (string | FlagAlias)[];

configPath ​

Dotted config path for config resolution (e.g. 'deploy.region').

ts
configPath?: string;

defaultDescription ​

Human-readable replacement for the default value in help, or false to omit the default annotation.

ts
defaultDescription?: string | false;

defaultValue ​

Runtime default value.

ts
defaultValue?: unknown;

deprecated ​

Deprecation marker. true deprecates without a message, a string carries the migration guidance.

ts
deprecated?: string | true;

description ​

Human-readable description for help text.

ts
description?: HelpDescription;

duplicates ​

How repeated CLI occurrences combine. See DuplicatePolicy.

ts
duplicates?: DuplicatePolicy;

elementSchema ​

Element definition or an already-built element schema.

ts
elementSchema?: FlagSchema<"string" | "number" | "boolean" | "enum" | "custom" | "array" | "count" | "keyValue"> | FlagDefinition<"string" | "number" | "boolean" | "enum" | "custom" | "array" | "count" | "keyValue">;

envVar ​

Environment variable name for env resolution.

ts
envVar?: string;

kind ​

Kind discriminator.

ts
kind: "array";

presence ​

Presence state.

ts
presence?: "optional" | "required" | "defaulted";

prompt ​

Interactive prompt configuration.

ts
prompt?: PromptConfig;

propagate ​

Whether the flag propagates to descendant commands.

ts
propagate?: boolean;

sensitive ​

Whether values from this input must be kept out of user-facing projections.

ts
sensitive?: boolean;

separator ​

Value separator each CLI occurrence is split on.

ts
separator?: string;

split ​

Env and stdin split policies.

ts
split?: SourceSplitBinding;

standard ​

Standard Schema v1 validator applied to each resolved value.

ts
standard?: StandardSchemaV1<unknown, unknown>;

stdin ​

Stdin binding. See StdinOptions.

ts
stdin?: StdinOptions;

unique ​

Deduplicate the resolved array, preserving first-seen order.

ts
unique?: boolean;

valueHint ​

Help placeholder label ('url' renders as <url>).

ts
valueHint?: string;

See Also ​

Released under the MIT License.