Go to repository

Function failIfOptionInvalid

Throw an error if the given value at the options object (if any) is not a valid option for the given option name, if the possible values is one of the given possible values.

if there is an option given and the value is not one of the possible values.

Parameters

  • options: unknown

    The object containing all options.

  • optionName: string

    The option name to verify.

  • possibleValues: string[]

    The possible values the option can take.

Returns void