Skip to content

Type Alias: EventsProducer ​

EventsProducer = (send, signal) => Promise<void> | void

Produce the events of a stream. The stream ends when the producer settles (an error ends it too, without other notice); when the client leaves, the signal aborts and the producer should return.

Parameters ​

send ​

SendEvent

Sends an event.

signal ​

AbortSignal

Aborts when the client leaves or the adapter stops.

Returns ​

Promise<void> | void

Released under the MIT License.