@fgaudo/effect-tea - v0.7.2
    Preparing search index...

    Function defect

    • 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.

      Parameters

      • reason: string

      Returns never