Skip to main content Link Search Menu Expand Document (external link)

BrowserStream overview

Added in v1.0.0


Table of contents


utils

fromEventListenerDocument

Creates a Stream from document.addEventListener.

Signature

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

Added in v1.0.0

fromEventListenerWindow

Creates a Stream from window.addEventListener.

Signature

export declare const fromEventListenerWindow: <K extends keyof WindowEventMap>(
  type: K,
  options?:
    | boolean
    | {
        readonly capture?: boolean
        readonly passive?: boolean
        readonly once?: boolean
        readonly bufferSize?: number | "unbounded" | undefined
      }
    | undefined
) => Stream.Stream<WindowEventMap[K], never, never>

Added in v1.0.0