Options
All
  • Public
  • Public/Protected
  • All
Menu

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

Index

Properties

Methods

Properties

cancel

cancel: () => void

Cancel the stream and release all related resources.

Type declaration

    • (): void
    • Returns void

Methods

[Symbol.asyncIterator]

  • [Symbol.asyncIterator](): AsyncIterator<Event>

Legend

  • Property

Generated using TypeDoc