FlagConfig
Compile-time state carried through the builder chain.
Adding new tracked properties only requires extending this interface — no builder signature changes.
- Import:
@kjanat/dreamcli - Export kind: interface
- Declared in:
src/core/schema/flag.ts - Source link:
src/core/schema/flag.ts:61
Signatures
ts
interface FlagConfig {}Members
Properties
elementEligible
Whether this builder may still be passed to flag.array() as the element schema.
Factories producing element-meaningful kinds start true. Flag-level modifiers (.alias(), .env(), .prompt(), .default(), …) flip it to false — those settings describe the flag, are never read from an element schema, and would otherwise be silently ignored.
ts
elementEligible: boolean;flagKind
The runtime kind discriminator, mirroring FlagKind.
ts
flagKind: "string" | "number" | "boolean" | "enum" | "array" | "custom" | "count" | "keyValue";optionalFallback
What an unresolved optional flag becomes at the action boundary.
ts
optionalFallback: OptionalFallback;presence
Whether the flag is optional, required, or has a default.
ts
presence: "optional" | "required" | "defaulted";valueType
The resolved value type (e.g. string, number, 'us' | 'eu').
ts
valueType: unknown;