Hierarchy

  • EventSourceInitDict

Properties

body?: string
errorFilter: ((err) => boolean)

Type declaration

headers: {
    [key: string]: string | string[];
}

Type declaration

  • [key: string]: string | string[]
initialRetryDelayMillis?: number

The initial delay and reset window for the built-in (default) retry-delay strategy. These configure the default behavior; they are ignored when a custom retryDelayStrategy is provided, since that strategy then owns all reconnection timing.

method?: string
readTimeoutMillis: number
retryDelayStrategy?: EventSourceRetryDelayStrategy

A custom strategy that replaces the built-in (default) one. When provided, the EventSource defers all reconnection timing to it and the built-in options (initialRetryDelayMillis, retryResetIntervalMillis) are ignored.

retryResetIntervalMillis?: number
urlBuilder?: (() => string)

Type declaration

    • (): string
    • Optional callback that returns a fresh URL on each reconnection attempt. When provided, the EventSource implementation should call this instead of reusing the original URL. This allows query parameters (e.g. basis) to be updated between reconnections.

      Returns string

Generated using TypeDoc