Skip to content

ArgConfig

Compile-time state carried through the builder chain.

Signatures

ts
interface ArgConfig {}

Members

Properties

argKind

The runtime kind discriminator, mirroring ArgKind.

ts
argKind: "string" | "number" | "boolean" | "enum" | "custom" | "keyValue";

elementEligible

Whether this builder may still be passed to arg.keyValue() as its entry value. Factories start true; the modifiers that describe the positional itself (.env(), .prompt(), .optional(), .stdin(), …) flip it to false, since an entry value is never read for those settings.

ts
elementEligible: boolean;

presence

Whether the arg is required, optional, or has a default.

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

valueType

The resolved value type (e.g. string, number, custom).

ts
valueType: unknown;

variadic

Whether this arg consumes remaining positionals.

ts
variadic: boolean;

See Also

Released under the MIT License.