getEventSourceConstructor
The EventSource constructor to use: the one from
adapterOptions
, otherwise the global one
(browsers, Deno, Bun).
null
when the runtime has none - pass one from the
eventsource
package in Node.js.
Import
import { getEventSourceConstructor } from "@hyper-fetch/sockets"
Source
Package
Parameters
getEventSourceConstructor(adapterOptions: EmptyTypes | SSEAdapterOptionsType)
Parameters
| Name | Type | Description |
|---|---|---|
| adapterOptions | |
Returns
null | (url: string | URL, eventSourceInitDict?: EventSourceInit) => EventSource

