in src/dispatcher.ts [16:26]
export function dispatch(actionMessage: ActionMessage) {
const currentMutator = getGlobalContext().currentMutator;
if (currentMutator) {
throw new Error(
`Mutator (${currentMutator}) may not dispatch action (${actionMessage.type})`
);
}
let dispatchWithMiddleware = getGlobalContext().dispatchWithMiddleware || finalDispatch;
transaction(dispatchWithMiddleware.bind(null, actionMessage));
}