Skip to content
greek conversion

OptionError

Defined in: src/option_error.ts:16 (opens in a new tab)

Error raised for an option that cannot be resolved: an unknown key or preset, a value outside the accepted ones, or two values that cannot be combined. A RangeError, with the option named by path and what was received, what is accepted, and the replacement of a key or value that a release candidate of 1.0.0 knew, when there is one. The message is for humans.

  • RangeError

new OptionError(message, details): OptionError

Defined in: src/option_error.ts:38 (opens in a new tab)

Creates the error with its message and the details of the option.

string

readonly string[]

string

unknown

string

OptionError

RangeError.constructor

readonly accepted: readonly string[]

Defined in: src/option_error.ts:26 (opens in a new tab)

The accepted values of the option, or the accepted keys of its group. For two values that cannot be combined, the values accepted next to the other one.


optional cause?: unknown

Defined in: web/docs/node_modules/typescript/lib/lib.es2022.error.d.ts:24

RangeError.cause


message: string

Defined in: web/docs/node_modules/typescript/lib/lib.es5.d.ts:1075

RangeError.message


name: string

Defined in: web/docs/node_modules/typescript/lib/lib.es5.d.ts:1074

RangeError.name


readonly path: string

Defined in: src/option_error.ts:18 (opens in a new tab)

Dotted path of the option, such as "transliteration.eta" or "preset"; for a key of a converter’s configuration, such as "exclude" or "aliases[0].spellings".


readonly received: unknown

Defined in: src/option_error.ts:20 (opens in a new tab)

The value received, or undefined for an unknown key.


readonly optional replacement?: string

Defined in: src/option_error.ts:35 (opens in a new tab)

The current path of a removed key, or the current spelling of a renamed value, for the names of the release candidates of 1.0.0: a migration aid, which a minor release after 1.0.0 may stop giving (docs/stability.md). A property of the error only when there is one: declared without a field, which would set it to undefined on every error.


optional stack?: string

Defined in: web/docs/node_modules/typescript/lib/lib.es5.d.ts:1076

RangeError.stack