context.js 733 B

123456789101112131415161718
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.Context = void 0;
  4. var logger_1 = require("./logger");
  5. var cache_storage_1 = require("./cache-storage");
  6. var Context = /** @class */ (function () {
  7. function Context(options, windowBounds) {
  8. var _a;
  9. this.windowBounds = windowBounds;
  10. this.instanceName = "#" + Context.instanceCount++;
  11. this.logger = new logger_1.Logger({ id: this.instanceName, enabled: options.logging });
  12. this.cache = (_a = options.cache) !== null && _a !== void 0 ? _a : new cache_storage_1.Cache(this, options);
  13. }
  14. Context.instanceCount = 1;
  15. return Context;
  16. }());
  17. exports.Context = Context;
  18. //# sourceMappingURL=context.js.map