Skip to content

ResolvedValue

Compute the final value type from config — this is what handlers receive.

Advanced type helper: this powers InferFlag and action-handler inference. Most apps do not need to mention it explicitly.

  • 'optional' + 'undefined' fallback → T | undefined

  • 'optional' + 'empty-array' fallback → T

  • 'required'T

  • 'defaulted'T

  • Import: @kjanat/dreamcli

  • Export kind: type

  • Declared in: src/core/schema/flag.ts

  • Source link: packages/dreamcli/src/core/schema/flag.ts:76

Signatures

ts
type ResolvedValue<C extends FlagConfig> = C["presence"] extends "optional" ? C["optionalFallback"] extends "empty-array" ? C["valueType"] : C["valueType"] | undefined : C["valueType"];

See Also

Released under the MIT License.