From e513fe7c461a6d1c9d24ee9a66b7432aed58da82 Mon Sep 17 00:00:00 2001 From: Yusuke Wada Date: Sat, 6 Jul 2024 15:59:06 +0900 Subject: [PATCH] fix(helper/streaming): remove slow types (#3100) --- src/helper/streaming/sse.ts | 2 +- src/helper/streaming/stream.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/helper/streaming/sse.ts b/src/helper/streaming/sse.ts index 5571f2da..1ed96e13 100644 --- a/src/helper/streaming/sse.ts +++ b/src/helper/streaming/sse.ts @@ -58,7 +58,7 @@ const run = async ( } } -const contextStash = new WeakMap() +const contextStash: WeakMap = new WeakMap() export const streamSSE = ( c: Context, cb: (stream: SSEStreamingApi) => Promise, diff --git a/src/helper/streaming/stream.ts b/src/helper/streaming/stream.ts index 98b5a48a..3d044957 100644 --- a/src/helper/streaming/stream.ts +++ b/src/helper/streaming/stream.ts @@ -1,7 +1,7 @@ import type { Context } from '../../context' import { StreamingApi } from '../../utils/stream' -const contextStash = new WeakMap() +const contextStash: WeakMap = new WeakMap() export const stream = ( c: Context, cb: (stream: StreamingApi) => Promise,