Function validateOptionType

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

    Parameters

    • value: unknown

      The option value to validate.

    • name: string

      The name of the option.

    • type: OptionType

      The expected type of the option.

    Returns void

    Throws an error if the option value is invalid.