Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Commit 9b183da

Browse files
committed
Fix type errors
1 parent 37c58b2 commit 9b183da

File tree

3 files changed

+2
-5
lines changed

3 files changed

+2
-5
lines changed

packages/miniflare/src/workers/core/entry.worker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ async function handleQueue(
159159
const flattened = await request.json<number | unknown[]>();
160160
const messages = unflatten(flattened, structuredSerializableRevivers);
161161
const queueResponse = await service.queue(queueName, messages);
162-
(queueResponse as QueueResponse & { time: number }).time =
162+
(queueResponse as FetcherQueueResult & { time: number }).time =
163163
Date.now() - startTime;
164164
return Response.json(queueResponse);
165165
}

packages/miniflare/test/plugins/d1/shared.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,6 @@ export class TestD1Database implements D1Database {
5454
return this[kSend]("/batch", statements);
5555
}
5656

57-
// @ts-expect-error this function should return a `Promise<D1ExecResult>`,
58-
// not a `Promise<D1Result<T>>`, `@cloudflare/workers-types` is wrong here
59-
// TODO(now): fix in `@cloudflare/workers-types`
6057
async exec(query: string): Promise<D1ExecResult> {
6158
return this[kSend]("/exec", query);
6259
}

packages/miniflare/test/plugins/d1/suite.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ export default (binding: string, WORKER_PATH: string) => {
192192
const select = await db.prepare(`SELECT * FROM ${tableColours}`);
193193
let result: ColourRow | null = await select.first<ColourRow>();
194194
t.deepEqual(result, { id: 1, name: "red", rgb: 0xff0000 });
195-
let id = await select.first<number>("id");
195+
let id: number | null = await select.first<number>("id");
196196
t.is(id, 1);
197197

198198
// Check with multiple statements (should only match on first statement)

0 commit comments

Comments
 (0)