UNPKG

reactant-share

Version:

A framework for building shared web applications with Reactant

26 lines (23 loc) 1.05 kB
import { __extends, __spreadArray, __read, __decorate } from '../node_modules/tslib/tslib.es6.js'; import { injectable, PluginModule } from 'reactant'; var IdentifierChecker = /** @class */ (function (_super) { __extends(IdentifierChecker, _super); function IdentifierChecker() { var _this = _super.apply(this, __spreadArray([], __read(arguments), false)) || this; _this.beforeCombineRootReducers = function (reducers) { Object.keys(reducers).forEach(function (key) { var _a = __read(key.split('/'), 2), prefix = _a[0], className = _a[1]; if (prefix === '@@reactant') { console.error("The decorator for class ".concat(className, " should set \"@injectable({ name: '").concat(className, "' })\".")); } }); return reducers; }; return _this; } IdentifierChecker = __decorate([ injectable() ], IdentifierChecker); return IdentifierChecker; }(PluginModule)); export { IdentifierChecker };