UNPKG

@twurple/common

Version:

Common functions used by the `@twurple` library family.

15 lines (14 loc) 507 B
/** @private */ export class CustomError extends Error { constructor(message, options) { var _a; super(message, options); // restore prototype chain Object.setPrototypeOf(this, new.target.prototype); // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition (_a = Error.captureStackTrace) === null || _a === void 0 ? void 0 : _a.call(Error, this, new.target.constructor); } get name() { return this.constructor.name; } }