importDeferProxy.js 920 B

1234567891011121314151617181920212223242526272829303132333435
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.default = _importDeferProxy;
  6. function _importDeferProxy(init) {
  7. var ns = null;
  8. var constValue = function (v) {
  9. return function () {
  10. return v;
  11. };
  12. };
  13. var proxy = function (run) {
  14. return function (_target, p, receiver) {
  15. if (ns === null) ns = init();
  16. return run(ns, p, receiver);
  17. };
  18. };
  19. return new Proxy({}, {
  20. defineProperty: constValue(false),
  21. deleteProperty: constValue(false),
  22. get: proxy(Reflect.get),
  23. getOwnPropertyDescriptor: proxy(Reflect.getOwnPropertyDescriptor),
  24. getPrototypeOf: constValue(null),
  25. isExtensible: constValue(false),
  26. has: proxy(Reflect.has),
  27. ownKeys: proxy(Reflect.ownKeys),
  28. preventExtensions: constValue(true),
  29. set: constValue(false),
  30. setPrototypeOf: constValue(false)
  31. });
  32. }
  33. //# sourceMappingURL=importDeferProxy.js.map