GT2/Ejectable/node_modules/@expo/configure-splash-screen/build/utils/StateManager.js

19 lines
599 B
JavaScript
Raw Normal View History

2021-08-16 00:14:59 +00:00
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
class StateManager {
constructor(state) {
this.state = state;
// @ts-ignore
this.appliedActions = {};
// @ts-ignore
this.applyAction = action => {
const [state, actionName, appliedAction] = action(this.state, this.appliedActions);
this.state = state;
// @ts-ignore
this.appliedActions[actionName] = appliedAction;
return this;
};
}
}
exports.default = StateManager;
//# sourceMappingURL=StateManager.js.map