Skip to main content

ParameterError

Extends

  • TypeError

Constructors

new ParameterError()

new ParameterError(field, target, message?): ParameterError

Parameters

field: string

target: null | string = null

message?: string

Returns

ParameterError

Overrides

TypeError.constructor

Properties

field

field: string


message

message: string

Inherited from

TypeError.message


name

name: "ParameterError" = ParameterError.NAME

Overrides

TypeError.name


stack?

optional stack: string

Inherited from

TypeError.stack


target?

optional target: string


NAME

readonly static NAME: "ParameterError" = "ParameterError"


prepareStackTrace()?

static optional prepareStackTrace: (err, stackTraces) => any

Optional override for formatting stack traces

Parameters

err: Error

stackTraces: CallSite[]

Returns

any

See

https://v8.dev/docs/stack-trace-api#customizing-stack-traces

Inherited from

TypeError.prepareStackTrace


stackTraceLimit

static stackTraceLimit: number

Inherited from

TypeError.stackTraceLimit

Methods

assert()

assert(target, params, fields)

static assert(target, params, ...fields): void

Parameters

target: string

params: any

• ...fields: string[]

Returns

void

assert(params, fields)

static assert(params, ...fields): void

Parameters

params: any

• ...fields: string[]

Returns

void


assertEmpty()

static assertEmpty(value, name, target?): asserts value

Parameters

value: unknown

name: string

target?: string

Returns

asserts value


captureStackTrace()

static captureStackTrace(targetObject, constructorOpt?): void

Create .stack property on a target object

Parameters

targetObject: object

constructorOpt?: Function

Returns

void

Inherited from

TypeError.captureStackTrace