Type alias Source<T>

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

Type Parameters

  • T

Type declaration

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


      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.


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


      Returns void

Generated using TypeDoc