UNPKG

@castore/event-storage-adapter-redux

Version:

DRY Castore EventStorageAdapter implementation using a Redux store

36 lines (25 loc) 2.07 kB
import _createClass from "@babel/runtime/helpers/createClass"; import _classCallCheck from "@babel/runtime/helpers/classCallCheck"; import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized"; import _inherits from "@babel/runtime/helpers/inherits"; import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn"; import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf"; import _wrapNativeSuper from "@babel/runtime/helpers/wrapNativeSuper"; import _defineProperty from "@babel/runtime/helpers/defineProperty"; function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } export var ReduxStateNotFoundError = /*#__PURE__*/function (_Error) { _inherits(ReduxStateNotFoundError, _Error); var _super = _createSuper(ReduxStateNotFoundError); function ReduxStateNotFoundError(_ref) { var _this; var eventStoreSliceName = _ref.eventStoreSliceName; _classCallCheck(this, ReduxStateNotFoundError); _this = _super.call(this, "Unable to find redux slice at path ".concat(eventStoreSliceName)); _defineProperty(_assertThisInitialized(_this), "eventStoreSliceName", void 0); _this.eventStoreSliceName = eventStoreSliceName; return _this; } return _createClass(ReduxStateNotFoundError); }( /*#__PURE__*/_wrapNativeSuper(Error)); //# sourceMappingURL=reduxStateNotFound.js.map