UNPKG

zorigami

Version:
26 lines 1.2 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); // import socket from 'shared/provide_socket'; var WorkerResponseCallbackStore = /** @class */ (function () { function WorkerResponseCallbackStore() { var _this = this; this.setResponseCallback = function (callback_guid, response_callback) { _this.response_callbacks[callback_guid] = response_callback; }; this.getResponseCallback = function (callback_guid) { return _this.response_callbacks[callback_guid]; }; this.removeResponseCallback = function (callback_guid) { delete _this.response_callbacks[callback_guid]; }; this.response_callbacks = {}; this.setResponseCallback = this.setResponseCallback.bind(this); this.getResponseCallback = this.getResponseCallback.bind(this); this.removeResponseCallback = this.removeResponseCallback.bind(this); } return WorkerResponseCallbackStore; }()); exports.WorkerResponseCallbackStore = WorkerResponseCallbackStore; var provider = new WorkerResponseCallbackStore(); exports.default = provider; //# sourceMappingURL=provide_response_callbacks.js.map