0
0
mirror of https://github.com/honojs/hono.git synced 2024-11-21 18:18:57 +01:00

fix(helper/streaming): remove slow types (#3100)

This commit is contained in:
Yusuke Wada 2024-07-06 15:59:06 +09:00 committed by GitHub
parent 2a4f257f36
commit e513fe7c46
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -58,7 +58,7 @@ const run = async (
}
}
const contextStash = new WeakMap<ReadableStream, Context>()
const contextStash: WeakMap<ReadableStream, Context> = new WeakMap<ReadableStream, Context>()
export const streamSSE = (
c: Context,
cb: (stream: SSEStreamingApi) => Promise<void>,

View File

@ -1,7 +1,7 @@
import type { Context } from '../../context'
import { StreamingApi } from '../../utils/stream'
const contextStash = new WeakMap<ReadableStream, Context>()
const contextStash: WeakMap<ReadableStream, Context> = new WeakMap<ReadableStream, Context>()
export const stream = (
c: Context,
cb: (stream: StreamingApi) => Promise<void>,