makeComposableOption

function
function 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

NameTypeDescription
nameTKeyThe name of the option to add
configTOptionConfigThe configuration for the option

Returns

(argv: ArgvParser<T>) => ArgvParser<T & MakeUndefinedPropertiesOptional<{ [key in string]: WithOptional<ResolveOptionType<TOptionConfig>, TOptionConfig> }>>

Type Parameters