Skip to content

ResolvedArgValue

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

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

Variadic args always produce an array. Non-variadic:

Signatures

ts
type ResolvedArgValue<C extends ArgConfig> = C["variadic"] extends true ? C["valueType"][] : C["presence"] extends "optional" ? C["valueType"] | undefined : C["valueType"];

See Also

Released under the MIT License.