makeComposableOption
functionfunction makeComposableOption<TKey, TOptionConfig>(
name: TKey,
config: TOptionConfig
): (
argv: ArgvParser<T>
) => ArgvParser<
T &
MakeUndefinedPropertiesOptional<{
[key in string]: WithOptional<
ResolveOptionType<TOptionConfig>,
TOptionConfig
>;
}>
>;A composition helper to be used with chain.
Parameters
| Name | Type | Description |
|---|---|---|
| name | TKey | The name of the option to add |
| config | TOptionConfig | The configuration for the option |
Returns
(argv: ArgvParser<T>) => ArgvParser<T & MakeUndefinedPropertiesOptional<{ [key in string]: WithOptional<ResolveOptionType<TOptionConfig>, TOptionConfig> }>>Type Parameters
TKeyextendsstringTOptionConfigextendsUnknownOptionConfig