From 98eee9e7df77f60dba0b13388c5c6aed4184c743 Mon Sep 17 00:00:00 2001 From: Yuval Adam <_@yuv.al> Date: Fri, 3 Oct 2025 11:56:29 +0200 Subject: Fix type issues --- src/worker.ts | 8 +++++--- 1 file 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 }; } -- cgit v1.3.1