isAllowedId()

Checks whether the given identification number was provided in the constructor

CommonErrors.prototype.isAllowedId()

Checks whether the given identification number was provided in the constructor.

common-errors.class.ts
protected isAllowedId<ErrorId extends Id>(id: ErrorId): boolean {
  return this.#id ? this.#id.has(id) : false;
}

Generic type variables

ErrorIdextendsId

A generic type variable ErrorId constrained by the generic type variable Id of the CommonErrors object indicates the type picked from the Id and its exact type is useful in picking the specific error from the storage.

Parameters

The error identification number of generic type variable ErrorId to test for its presence in the object.

Return type

this

Example usage

Last updated

Was this helpful?