ArgSchema
The runtime descriptor stored inside every ArgBuilder. Consumers (parser, help generator) read this to understand the arg's shape without touching generics.
- Import:
@kjanat/dreamcli - Export kind: interface
- Declared in:
src/core/schema/arg.ts - Source link:
src/core/schema/arg.ts:107
Signatures
interface ArgSchema {}Members
Properties
defaultValue
Runtime default value (if any).
defaultValue: unknown;deprecated
Deprecation marker.
undefined— not deprecated (default)true— deprecated with no migration messagestring— deprecated with a reason/migration message
When a deprecated arg is used, a warning is emitted to stderr. Help text shows [deprecated] or [deprecated: <reason>].
deprecated: string | true | undefined;description
Human-readable description for help text.
description: string | undefined;enumValues
Allowed literal values when kind === 'enum'.
enumValues: readonly string[] | undefined;envVar
Environment variable name for env resolution.
When set and the CLI value is absent, the resolver reads this env var and coerces the string to the arg's declared kind.
envVar: string | undefined;kind
What kind of value this arg accepts.
kind: "string" | "number" | "enum" | "custom";numberConstraints
Numeric constraints when kind === 'number' (undefined otherwise).
Enforced at the parse and resolution boundaries. finite defaults to true, so Infinity is rejected even when no constraints object is set.
numberConstraints: NumberConstraints | undefined;parseFn
Custom parse function (only when kind === 'custom').
parseFn: ArgParseFn<unknown> | undefined;presence
Current presence state.
presence: "optional" | "required" | "defaulted";stdinMode
Whether this arg may read from stdin during resolution.
stdinMode: boolean;variadic
Whether this arg consumes all remaining positionals.
variadic: boolean;