clide-js
    Preparing search index...

    Function validateOptionType

    • Validates an option value based on its type and throws an error if the value is invalid.

      Parameters

      • __namedParameters: { config: OptionConfig; name: string; throws?: boolean; value: unknown }
        • config: OptionConfig

          The option config.

        • name: string

          The name of the option.

        • Optionalthrows?: boolean

          Whether to throw an error if the value is invalid.

          true
          
        • value: unknown

          The option value to validate.

      Returns undefined | boolean

      Throws an error if the option value is invalid and throws is true.