updateStateOrThrow

inline suspend fun <T : S, S : MVIState> PipelineContext<S, *, *>.updateStateOrThrow(crossinline transform: suspend T.() -> S)

Update the state if it is of type T, otherwise throw InvalidStateException.

Same rules apply as StateReceiver.updateState