Skip to main content

Interface: EventStream#

A stream of events that can be consumed with a for-await-loop and that can also be cancelled externally. The second part is needed when cancellation may occur during the await phase of the loop, in which case calling cancel is the only way to correctly release all stream resources.

Hierarchy#

  • AsyncIterable<Event>

    EventStream

Properties#

cancel#

cancel: () => void

Cancel the stream and release all related resources.

Type declaration:#

▸ (): void

Returns: void

Methods#

[Symbol.asyncIterator]#

[Symbol.asyncIterator](): AsyncIterator<Event, any, undefined>

Returns: AsyncIterator<Event, any, undefined>

Inherited from: void