Class: ParameterError
Hierarchy
-
TypeError
↳
ParameterError
Constructors
constructor
• new ParameterError(field
, target?
, message?
): ParameterError
Parameters
Name | Type | Default value |
---|---|---|
field | string | undefined |
target | null | string | null |
message? | string | undefined |
Returns
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
Name | Type |
---|---|
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
): void
Parameters
Name | Type |
---|---|
target | string |
params | any |
...fields | string [] |
Returns
void
▸ assert(params
, ...fields
): void
Parameters
Name | Type |
---|---|
params | any |
...fields | string [] |
Returns
void
assertEmpty
▸ assertEmpty(value
, name
, target?
): asserts value
Parameters
Name | Type |
---|---|
value | unknown |
name | string |
target? | string |
Returns
asserts value
captureStackTrace
▸ captureStackTrace(targetObject
, constructorOpt?
): void
Create .stack property on a target object
Parameters
Name | Type |
---|---|
targetObject | object |
constructorOpt? | Function |
Returns
void
Inherited from
TypeError.captureStackTrace