Allow stream helper arguments callback and onError to be synchronous functions
Closed this issue · 2 comments
sor4chi commented
yusukebe commented
Hi @sor4chi
Simply change
Promise<void>
toPromise<void> | void
Though I might not understand what you meant completely, I think cb
has to await
, so it should be Promise<void>
:
https://github.com/honojs/hono/blob/main/src/helper/streaming/stream.ts#L13
sor4chi commented
Oops, I forgot that stream.write is asynchronous to begin with. Sorry!