@laserware/stasis
    Preparing search index...

    Function flush

    • Creates an effect that instructs the middleware to flush all buffered items from the channel. Flushed items are returned back to the saga, so they can be utilized if needed.

      function* saga() { const chan = yield actionChannel('ACTION')

       try {
         while (true) {
           const action = yield take(chan)
           // ...
         }
       } finally {
         const actions = yield flush(chan)
         // ...
       }
      

      }

      Type Parameters

      • T

      Parameters

      • channel: FlushableChannel<T>

        a Channel Object.

      Returns FlushEffect<T>