Skip to content

CustomArgDefinition ​

Definition of a custom arg.

Signatures ​

ts
interface CustomArgDefinition extends ArgDefinitionBase {}

Members ​

Properties ​

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?: string;

envVar ​

Environment variable name for env resolution.

ts
envVar?: string;

kind ​

Kind discriminator.

ts
kind: "custom";

parseFn ​

Parse function applied to the raw value.

ts
parseFn?: ArgParseFn<unknown>;

presence ​

Presence state.

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

standard ​

Standard Schema v1 validator applied to the resolved value.

ts
standard?: StandardSchemaV1<unknown, unknown>;

stdinMode ​

Whether this arg may read from stdin during resolution.

ts
stdinMode?: boolean;

variadic ​

Whether this arg consumes all remaining positionals.

ts
variadic?: boolean;

See Also ​

Released under the MIT License.