Type alias Backpressure

Backpressure: ((cb?: (() => any)) => boolean)

A backpressure controller: returns true if downstream is ready to accept data.

Type declaration

    • (cb?: (() => any)): boolean
    • Parameters

      • Optional cb: (() => any)

        (optional) - a callback to run when the downstream consumer wishes to resume event production (i.e., when a sink calls Throttle.resume()). The callback is automatically unregistered when invoked, so the producer must re-register it after each call if it wishes to keep being called.

          • (): any
          • Returns any

      Returns boolean