Skip to main content

Class: ParameterError

Hierarchy

  • TypeError

    ParameterError

Constructors

constructor

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

Parameters

NameTypeDefault value
fieldstringundefined
targetnull | stringnull
message?stringundefined

Returns

ParameterError

Overrides

TypeError.constructor

Properties

field

field: string


message

message: string

Inherited from

TypeError.message


name

name: "ParameterError"

Overrides

TypeError.name


stack

Optional stack: string

Inherited from

TypeError.stack


target

Optional target: string


NAME

Static Readonly NAME: "ParameterError"


prepareStackTrace

Static Optional prepareStackTrace: (err: Error, stackTraces: CallSite[]) => any

Type declaration

▸ (err, stackTraces): any

Optional override for formatting stack traces

Parameters
NameType
errError
stackTracesCallSite[]
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): void

Parameters

NameType
targetstring
paramsany
...fieldsstring[]

Returns

void

assert(params, ...fields): void

Parameters

NameType
paramsany
...fieldsstring[]

Returns

void


assertEmpty

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

Parameters

NameType
valueunknown
namestring
target?string

Returns

asserts value


captureStackTrace

captureStackTrace(targetObject, constructorOpt?): void

Create .stack property on a target object

Parameters

NameType
targetObjectobject
constructorOpt?Function

Returns

void

Inherited from

TypeError.captureStackTrace