Skip to main content

NotImplementedError

Callable


  • NotImplementedError constructor

    @example
    function someFunction() {
    throw NotImplementedError();// message can be customized
    }

Index

Constructor

readonlycreate

create: (...properties: [properties?: ParametersProperties<NotImplementedError>]) => NotImplementedError

Return a new CustomError

@example
const MyError = CustomError.define('MyError1');
const error = MyError.create({
message: 'my custom message', // customize message (optional)
cause: parentError, // Error that caused this error (optional)
})

Other

readonlyerrorName

errorName: NotImplementedError

The model name constant. Can be useful for switch / case statements.

@example
const error: SomeError;
switch (error.name) {
case SomeError.errorName: //...
}

readonlyhasInstance

hasInstance: (anyValue: unknown) => anyValue is NotImplementedError

Predicate that returns true when anyValue is a Model The implementation compares anyValue.name === Module.errorName

@example
const MyError = CustomError.define('MyError1');
const unknownError: unknown;
if (MyError.hasInstance(unknownError)) {
// unknownError.name === 'MyError1'
}
Page Options