"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } var Dispatcher = function Dispatcher() { var _this = this; _classCallCheck(this, Dispatcher); this.callbacks = {}; this.data = {}; this.update = function (namespace) { (_this.callbacks[namespace] || []).forEach(function (callback) { try { var data = _this.data[namespace]; callback(data); } catch (e) { callback(undefined); } }); }; }; exports.default = Dispatcher;