UNPKG

electron-event-flux

Version:

Redux store which synchronizes between instances in multiple process

58 lines (57 loc) 1.83 kB
"use strict"; var _a, _b, _c; Object.defineProperty(exports, "__esModule", { value: true }); var IS_STORE = '@@__STORE_ITEM__@@'; var StoreDeclarer = /** @class */ (function () { function StoreDeclarer(Store, options) { this[_a] = true; this.Store = Store; this.options = options; } StoreDeclarer.isStore = function (maybeStore) { return !!(maybeStore && maybeStore[IS_STORE]); }; return StoreDeclarer; }()); _a = IS_STORE; exports.StoreDeclarer = StoreDeclarer; function declareStore(Store, options) { return new StoreDeclarer(Store, options); } exports.declareStore = declareStore; var IS_STORE_LIST = '@@__STORE_LIST__@@'; var StoreListDeclarer = /** @class */ (function () { function StoreListDeclarer(Store, options) { this[_b] = true; this.Store = Store; this.options = options; } StoreListDeclarer.isStoreList = function (maybeList) { return !!(maybeList && maybeList[IS_STORE_LIST]); }; return StoreListDeclarer; }()); _b = IS_STORE_LIST; exports.StoreListDeclarer = StoreListDeclarer; function declareStoreList(Store, options) { return new StoreListDeclarer(Store, options); } exports.declareStoreList = declareStoreList; var IS_STORE_MAP = '@@__STORE_MAP__@@'; var StoreMapDeclarer = /** @class */ (function () { function StoreMapDeclarer(Store, options) { this[_c] = true; this.Store = Store; this.options = options; } StoreMapDeclarer.isStoreMap = function (maybeMap) { return !!(maybeMap && maybeMap[IS_STORE_MAP]); }; return StoreMapDeclarer; }()); _c = IS_STORE_MAP; exports.StoreMapDeclarer = StoreMapDeclarer; function declareStoreMap(Store, options) { return new StoreMapDeclarer(Store, options); } exports.declareStoreMap = declareStoreMap;