We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f466059 commit ecd6783Copy full SHA for ecd6783
src/horizon/call_builder.ts
@@ -102,7 +102,9 @@ export class CallBuilder<
102
* @param {number} [options.reconnectTimeout] Custom stream connection timeout in ms, default is 15 seconds.
103
* @returns {Function} Close function. Run to close the connection and stop listening for new events.
104
*/
105
- public stream(options: EventSourceOptions<T extends ServerApi.CollectionPage ? T["records"][number] : T> = {}): () => void {
+ public stream(options: EventSourceOptions<
106
+ T extends ServerApi.CollectionPage<infer U> ? U : T
107
+ > = {}): () => void {
108
// Check if EventSource use is enabled
109
if (EventSource === undefined){
110
throw new Error("Streaming requires eventsource to be enabled. If you need this functionality, compile with USE_EVENTSOURCE=true.");
0 commit comments