UNPKG

oo-redux-utils2

Version:
24 lines 879 B
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const AbstractAction_1 = __importDefault(require("./AbstractAction")); class AbstractCompositeAction extends AbstractAction_1.default { constructor(stateNamespace, dispatch_) { super(stateNamespace); this.dispatch_ = dispatch_; } dispatch(action) { setTimeout(() => this.dispatch_(action), 0); } dispatchWithDi(ActionClass, diContainer, otherArgs) { setTimeout(() => diContainer .create(ActionClass, { ...otherArgs, }) .then((action) => this.dispatch(action)), 0); } } exports.default = AbstractCompositeAction; //# sourceMappingURL=AbstractCompositeAction.js.map