Type Alias OptionConfigPrimitiveType<T>

OptionConfigPrimitiveType: T extends OptionConfig
    ? T["required"] extends true
        ? OptionArgumentType<
            OptionConfigType<T>,
            "nargs" extends keyof T ? T["nargs"] : undefined,
        >
        : T["default"] extends MaybeReadonly<
            OptionArgumentType<OptionConfigType<T>>,
        >
            ? OptionArgumentType<
                OptionConfigType<T>,
                "nargs" extends keyof T ? T["nargs"] : undefined,
            >
            :
                | OptionArgumentType<
                    OptionConfigType<T>,
                    "nargs" extends keyof T ? T["nargs"] : undefined,
                >
                | undefined
    : undefined

Get the primitive type for an option considering it's config.

Type Parameters