From cc08278a620e1d3a466932cc6e2b5dce894c0b9f Mon Sep 17 00:00:00 2001 From: Mario Zechner Date: Sat, 31 Oct 2026 20:46:25 +0000 Subject: [PATCH] fix(chord): slice 10 http builds without DOM types --- packages/chord/src/next-node/http/node.ts | 2 +- packages/chord/src/next-node/http/request.ts | 2 +- packages/chord/src/next-node/http/response.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/chord/src/next-node/http/node.ts b/packages/chord/src/next-node/http/node.ts index 8f0727c38..2275f7123 100644 --- a/packages/chord/src/next-node/http/node.ts +++ b/packages/chord/src/next-node/http/node.ts @@ -229,7 +229,7 @@ async function pump(body: ReadableStream, res: ServerResponse): Prom const cancel = (): void => void reader.cancel().catch(() => {}); res.once("close", cancel); for (;;) { - let next: ReadableStreamReadResult; + let next: Awaited>; try { next = await reader.read(); } catch { diff --git a/packages/chord/src/next-node/http/request.ts b/packages/chord/src/next-node/http/request.ts index f6668a0ee..194f80f7a 100644 --- a/packages/chord/src/next-node/http/request.ts +++ b/packages/chord/src/next-node/http/request.ts @@ -108,7 +108,7 @@ export class WebRequest implements HttpRequest { let read = 0; try { for (;;) { - let next: ReadableStreamReadResult; + let next: Awaited>; try { next = await reader.read(); } catch { diff --git a/packages/chord/src/next-node/http/response.ts b/packages/chord/src/next-node/http/response.ts index af9363a73..8ff13efbb 100644 --- a/packages/chord/src/next-node/http/response.ts +++ b/packages/chord/src/next-node/http/response.ts @@ -95,7 +95,7 @@ export function webResponse(answer: Answer): Response { // Bodies are bytes over plain `ArrayBuffer`s (never shared memory); the DOM types ask for exactly that. const headers = new Headers(); for (const [name, value] of answer.headers.lines()) headers.append(name, value); - return new Response(answer.body as BodyInit | null, { status: answer.status, headers }); + return new Response(answer.body as ConstructorParameters[0], { status: answer.status, headers }); } /**