dreamstate
Version:
Store management library based on react context and observers
19 lines (16 loc) • 572 B
JavaScript
import { DreamstateError } from './DreamstateError.js';
import { EDreamstateErrorCode } from '../../types/error.js';
/**
* Utility function that throws error on every call.
* Intended to be placeholder when react scope is being disposed.
*/
function throwAfterDisposal() {
throw new DreamstateError(EDreamstateErrorCode.INSTANCE_DISPOSED_SCOPE);
}
/**
* Utility function that throws error on every out of scope call.
*/
function throwOutOfScope() {
throw new DreamstateError(EDreamstateErrorCode.OUT_OF_SCOPE);
}
export { throwAfterDisposal, throwOutOfScope };