Skip to main content

Class: EnumValidationError

Thrown when input fails to match the given values for an enum flag.

Extends

Constructors

new EnumValidationError()

new EnumValidationError(externalFlagName, input, values, corrections): EnumValidationError

Parameters

externalFlagName: ExternalFlagName

input: string

values: readonly string[]

corrections: readonly string[]

Returns

EnumValidationError

Overrides

ArgumentScannerError.constructor

Defined in

packages/core/src/parameter/scanner.ts:222

Properties

cause?

optional cause: unknown

Inherited from

ArgumentScannerError.cause

Defined in

node_modules/typescript/lib/lib.es2022.error.d.ts:24


externalFlagName

readonly externalFlagName: string

External name of flag that was parsing this input.

Defined in

packages/core/src/parameter/scanner.ts:213


input

readonly input: string

Command line input that triggered this error.

Defined in

packages/core/src/parameter/scanner.ts:217


message

message: string

Inherited from

ArgumentScannerError.message

Defined in

node_modules/typescript/lib/lib.es5.d.ts:1077


name

name: string

Inherited from

ArgumentScannerError.name

Defined in

node_modules/typescript/lib/lib.es5.d.ts:1076


stack?

optional stack: string

Inherited from

ArgumentScannerError.stack

Defined in

node_modules/typescript/lib/lib.es5.d.ts:1078


values

readonly values: readonly string[]

All possible enum values.

Defined in

packages/core/src/parameter/scanner.ts:221