UNPKG

@donation-alerts/common

Version:

Common utils and types that are used in other @donation-alerts packages.

13 lines (12 loc) 338 B
/** @internal */ export class CustomError extends Error { constructor(message) { super(message); // restore prototype chain Reflect.setPrototypeOf(this, new.target.prototype); Error.captureStackTrace?.(this, new.target.constructor); } get name() { return this.constructor.name; } }