UNPKG

@turbox3d/command-manager

Version:

Large-scale productivity application command management library

26 lines 1.38 kB
import _createClass from "@babel/runtime/helpers/esm/createClass"; import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck"; import _possibleConstructorReturn from "@babel/runtime/helpers/esm/possibleConstructorReturn"; import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf"; import _inherits from "@babel/runtime/helpers/esm/inherits"; function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); } function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } import { CommandManager } from './CommandManager'; function install(declaredMap) { return /*#__PURE__*/function (_CommandManager) { function _class() { var _this; _classCallCheck(this, _class); _this = _callSuper(this, _class); Object.keys(declaredMap).forEach(function (key) { var command = new declaredMap[key](_this); _this[key] = command; }); _this.installed(); return _this; } _inherits(_class, _CommandManager); return _createClass(_class); }(CommandManager); } export { install };