[ Web Proxy ]
URL:
Viewing: https://raw.githubusercontent.com/Aetherus/msgpack-javascript/main/src/DecodeError.ts [Back]  [Original]

export class DecodeError extends Error {
  constructor(message: string) {
    super(message);

    // fix the prototype chain in a cross-platform way
    const proto: typeof DecodeError.prototype = Object.create(DecodeError.prototype);
    Object.setPrototypeOf(this, proto);

    Object.defineProperty(this, "name", {
      configurable: true,
      enumerable: false,
      value: DecodeError.name,
    });
  }
}

Web Proxy Viewer  |  New URL  |  Original Page