UNPKG

react-native-xenon

Version:

A powerful in-app debugging tool for React Native.

20 lines (19 loc) 1.12 kB
"use strict"; var _class; function _applyDecoratedDescriptor(i, e, r, n, l) { var a = {}; return Object.keys(n).forEach(function (i) { a[i] = n[i]; }), a.enumerable = !!a.enumerable, a.configurable = !!a.configurable, ("value" in a || a.initializer) && (a.writable = !0), a = r.slice().reverse().reduce(function (r, n) { return n(i, e, r) || r; }, a), l && void 0 !== a.initializer && (a.value = a.initializer ? a.initializer.call(l) : void 0, a.initializer = void 0), void 0 === a.initializer ? (Object.defineProperty(i, e, a), null) : a; } import { frozen } from "../core/utils.js"; let Interceptor = (_class = class Interceptor { #isInterceptorEnabled = false; get isInterceptorEnabled() { return this.#isInterceptorEnabled; } set isInterceptorEnabled(value) { this.#isInterceptorEnabled = value; } set(key, handler) { this.handlers[key] ??= handler; return this; } }, _applyDecoratedDescriptor(_class.prototype, "set", [frozen], Object.getOwnPropertyDescriptor(_class.prototype, "set"), _class.prototype), _class); export { Interceptor as default }; //# sourceMappingURL=Interceptor.js.map