```sh npm install --save extra-sse # or yarn add extra-sse ```
npm install extra-ssesh
npm install --save extra-sse
or
yarn add extra-sse
`API
`ts
interface IEvent {
comment?: string
event?: string
data?: string
id?: string
retry?: number
}
`$3
`ts
function stringifyEvent(event: IEvent): IterableIterator
`$3
`ts
/**
* @throws {HTTPClientError}
* @throws {AbortError}
*/
function fetchEvents(
input: string | URL | Getter
, options?: {
lastEventId?: string autoReconnect?: boolean = true
retry?: number = 0
/**
* The handler is called when a connection is properly established.
* The handler is also called when the connection is re-established.
*/
onOpen?: () => void
}
): AsyncIterableIterator
``