UNPKG

dreamstate

Version:

Store management library based on react context and observers

1 lines 1.34 kB
import{EDreamstateErrorCode as e}from"../../types/error.js";function t(t,c){switch(t){case e.INSTANCE_DISPOSED_LIFECYCLE:return"Disposed manager instances are not supposed to access lifecycle.";case e.INSTANCE_DISPOSED_SCOPE:return"Disposed manager instances are not supposed to access scope.";case e.OUT_OF_SCOPE:return"Instance is out of scope, make sure it is created or mocked correctly.";case e.INCORRECT_PARAMETER:return"Incorrect parameter supplied.".concat(c?" ".concat(c):"");case e.INCORRECT_SIGNAL_TYPE:return"Unexpected signal type provided, expected symbol, string or number.".concat(c?" Got: '".concat(c,"' instead."):"");case e.INCORRECT_SIGNAL_LISTENER:return"Signal listener must be function, '".concat(c,"' provided.");case e.INCORRECT_QUERY_TYPE:return"Unexpected query type provided, expected symbol, string or number. Got: '".concat(c,"' instead.");case e.INCORRECT_QUERY_PROVIDER:return"Query provider must be factory function, '".concat(c,"' provided.");case e.TARGET_CONTEXT_MANAGER_EXPECTED:return"Cannot perform action, class extending ContextManager is expected.".concat(c?" ".concat(c):"");case e.RESTRICTED_OPERATION:return"Operation is restricted.".concat(c?" ".concat(c):"");case e.UNEXPECTED_ERROR:default:return"Unexpected dreamstate error.".concat(c?" ".concat(c):"")}}export{t as mapDreamstateErrorMessage};