The twin of reject, for a message that cannot arrive: throws an InvariantDefect with reason, and the run
dies with it. An expression, so that it fits a branch of a ternary or a Match: state.save._tag === 'Saving' ? … : defect('A save completed while nothing was saving'). It is for the synchronous functions
(update, onEvent, makeModel, subscriptions); inside an Effect, Effect.die is the way.
The twin of
reject, for a message that cannot arrive: throws anInvariantDefectwithreason, and the run dies with it. An expression, so that it fits a branch of a ternary or aMatch:state.save._tag === 'Saving' ? … : defect('A save completed while nothing was saving'). It is for the synchronous functions (update,onEvent,makeModel,subscriptions); inside an Effect,Effect.dieis the way.