UNPKG

@worker-tools/router

Version:

A router for Worker Runtimes such as Cloudflare Workers and Service Workers.

30 lines 2.52 kB
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) { if (kind === "m") throw new TypeError("Private method is not writable"); if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; }; var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); }; var _ErrorEventPolyfill_dict; // deno-lint-ignore-file no-explicit-any class ErrorEventPolyfill extends Event { constructor(type, eventInitDict) { super(type); _ErrorEventPolyfill_dict.set(this, void 0); __classPrivateFieldSet(this, _ErrorEventPolyfill_dict, { ...eventInitDict }, "f"); } get message() { var _a, _b; return (_b = (_a = __classPrivateFieldGet(this, _ErrorEventPolyfill_dict, "f")) === null || _a === void 0 ? void 0 : _a.message) !== null && _b !== void 0 ? _b : ''; } get filename() { var _a, _b; return (_b = (_a = __classPrivateFieldGet(this, _ErrorEventPolyfill_dict, "f")) === null || _a === void 0 ? void 0 : _a.filename) !== null && _b !== void 0 ? _b : ''; } get lineno() { var _a, _b; return (_b = (_a = __classPrivateFieldGet(this, _ErrorEventPolyfill_dict, "f")) === null || _a === void 0 ? void 0 : _a.lineno) !== null && _b !== void 0 ? _b : 0; } get colno() { var _a, _b; return (_b = (_a = __classPrivateFieldGet(this, _ErrorEventPolyfill_dict, "f")) === null || _a === void 0 ? void 0 : _a.colno) !== null && _b !== void 0 ? _b : 0; } get error() { var _a; return (_a = __classPrivateFieldGet(this, _ErrorEventPolyfill_dict, "f")) === null || _a === void 0 ? void 0 : _a.error; } } _ErrorEventPolyfill_dict = new WeakMap(); export const ErrorEvent = 'ErrorEvent' in self ? self.ErrorEvent : ErrorEventPolyfill; //# sourceMappingURL=error-event.js.map