summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuval Adam <_@yuv.al>2025-10-03 11:56:29 +0200
committerYuval Adam <_@yuv.al>2025-10-03 11:56:29 +0200
commit98eee9e7df77f60dba0b13388c5c6aed4184c743 (patch)
tree5892b48e09fafe06aae1011d0dbba53b04fb4a20
parent7b6314f480d4f7a0932d6463e5341e21566a37c2 (diff)
Fix type issues
-rw-r--r--src/worker.ts8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/worker.ts b/src/worker.ts
index e982634..186887d 100644
--- a/src/worker.ts
+++ b/src/worker.ts
@@ -2,17 +2,19 @@ import type { SSRManifest } from 'astro';
import { App } from 'astro/app';
import { handle } from '@astrojs/cloudflare/handler';
import { handleSchedule } from './functions/scheduled';
+import type { ExecutionContext } from '@cloudflare/workers-types';
export function createExports(manifest: SSRManifest) {
const app = new App(manifest);
return {
default: {
- async fetch(request, env, ctx) {
+ async fetch(request: Request, env: Env, ctx: ExecutionContext) {
+ // @ts-expect-error - https://github.com/withastro/astro/issues/14038
return handle(manifest, app, request, env, ctx);
},
- async scheduled(controller, env, ctx) {
+ async scheduled(controller: ScheduledController, env: Env, ctx: ExecutionContext) {
return await handleSchedule(controller, env, ctx);
}
- }
+ } satisfies ExportedHandler<Env>
};
}