effect-io-ai

Package: @effect/platform-browser
Module: BrowserStream

BrowserStream.fromEventListenerDocument

Creates a Stream from document.addEventListener.

Details

By default, the underlying buffer is unbounded in size. You can customize the buffer size by passing an object as the second argument with the bufferSize field.

Signature

declare const fromEventListenerDocument: <K extends keyof DocumentEventMap>(type: K, options?: boolean | { readonly capture?: boolean; readonly passive?: boolean; readonly once?: boolean; readonly bufferSize?: number | undefined; } | undefined) => Stream.Stream<DocumentEventMap[K], never, never>

Source

Since v4.0.0