Is there an existing issue for this?
Is your feature request related to a problem? Please describe the problem.
I am trying to use signalr client, but found that it returns AsyncGenerator, which not very easy to use in modern APIs like for await:
class HubConnection {
stream<T = any>(methodName: string, ...args: any[]): IStreamResult<T>;
}
Describe the solution you'd like
A new api that returns AsyncGenerator:
HubConnection {
stream<T = any>(methodName: string, ...args: any[]): IStreamResult<T>;
streamAsync<T = any>(methodName: string, ...args: any[]): AsyncGenerator<T>;
}
so I can using for await to execute this streamAsync result:
for await (const c of hubConnection.streamAsync(this.userInput)) {
resp.content += c;
}
Additional context
No response