Type alias Source<T>

Source<T>: ((sink) => void)

Type Parameters

  • T

Type declaration

    • (sink): void
    • Factory function that calls Sinks with Signals when invoked.

      Remarks

      A Source is a factory function that when invoked with a Sink, calls it with Signals to create a stream of events, informing it of new values and the potential end of the stream of values. The first signal a Source sends is always a Start signal that sends a talkback function to the Sink, so it may request new values or cancel the source.

      See

      • Signal for the data structure of signals.
      • Sink for the data structure of sinks.

      Parameters

      Returns void

Generated using TypeDoc