Method
constructor
(
url: string,
options?: {
headers?: Record<string, string>;
withCredentials?: boolean;
},
)
Source from the content-addressed store, hash-verified
| 25 | private reader: ReadableStreamDefaultReader<Uint8Array> | null = null; |
| 26 | |
| 27 | constructor( |
| 28 | url: string, |
| 29 | options?: { |
| 30 | headers?: Record<string, string>; |
| 31 | withCredentials?: boolean; |
| 32 | }, |
| 33 | ) { |
| 34 | this.url = url; |
| 35 | if (options?.withCredentials) { |
| 36 | this.withCredentials = options.withCredentials; |
| 37 | } |
| 38 | |
| 39 | this.connect(options?.headers); |
| 40 | } |
| 41 | |
| 42 | addEventListener<K extends keyof EventSourceEventMap>( |
| 43 | type: K, |
Callers
nothing calls this directly
Tested by
no test coverage detected