Skip to main content

Class: TypeCheckErrorFailure

A thrown type-check failure (extends MobxKeystoneError).

Thrown by TypeCheckError.throw when a runtime type check fails. Use instanceof TypeCheckErrorFailure to distinguish type-check errors from other MobxKeystoneError instances.

Extends​

Constructors​

Constructor​

new TypeCheckErrorFailure(data): TypeCheckErrorFailure;

Parameters​

ParameterType
dataTypeCheckErrorData

Returns​

TypeCheckErrorFailure

Overrides​

MobxKeystoneError.constructor

Properties​

actualValue​

readonly actualValue: any;

cause?​

optional cause?: unknown;

Inherited from​

MobxKeystoneError.cause


expectedTypeName​

readonly expectedTypeName: string;

message​

message: string;

Inherited from​

MobxKeystoneError.message


modelTrail?​

readonly optional modelTrail?: readonly string[];

name​

name: string;

Inherited from​

MobxKeystoneError.name


path​

readonly path: Path;

stack?​

optional stack?: string;

Inherited from​

MobxKeystoneError.stack


typeCheckedValue?​

readonly optional typeCheckedValue?: any;

Methods​

isError()​

static isError(error): error is Error;

Indicates whether the argument provided is a built-in Error instance or not.

Parameters​

ParameterType
errorunknown

Returns​

error is Error

Inherited from​

MobxKeystoneError.isError