@turbox3d/command-manager
Version:
Large-scale productivity application command management library
52 lines (51 loc) • 1.48 kB
JavaScript
;
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.create = create;
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
var _Command = require("./Command");
// 仅作为类型标示无参数的 Command 生命周期函数
var INoParamCommand = /*#__PURE__*/function () {
function INoParamCommand() {
(0, _classCallCheck2["default"])(this, INoParamCommand);
}
return (0, _createClass2["default"])(INoParamCommand, [{
key: "apply",
value: function apply() {
//
}
}, {
key: "active",
value: function active() {
//
}
}]);
}(); // 仅作为类型标示有参数的 Command 生命周期函数
var IParamCommand = /*#__PURE__*/function () {
function IParamCommand() {
(0, _classCallCheck2["default"])(this, IParamCommand);
}
return (0, _createClass2["default"])(IParamCommand, [{
key: "apply",
value: function apply(param) {
//
}
}, {
key: "active",
value: function active(param) {
//
}
}]);
}(); // type E = keyof Command;
// type P = Pick<Command, 'dispose' | 'distributeEvent' | '$children'>;
/**
* 构建一个 Command 基类
*
* 范型类型为激活时的函数参数
*/
function create() {
return _Command.Command;
}