From e868a924fa18ed5fd375eda3c16e13b304d2814c Mon Sep 17 00:00:00 2001 From: Asher Gomez Date: Thu, 12 Jun 2025 21:25:36 +1000 Subject: [PATCH] fix(update): correct return and argument types for `defineFn()` (#3023) Previously, the return union type of the inner function and the function itself contained a `Request` instead of a `Response`. --- src/compat.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/compat.ts b/src/compat.ts index 6815b694..f6c3887c 100644 --- a/src/compat.ts +++ b/src/compat.ts @@ -46,10 +46,10 @@ export type Handler> = HandlerFn< function defineFn( fn: ( ctx: FreshContext, - ) => Request | VNode | null | Promise, + ) => Response | VNode | null | Promise, ): ( ctx: FreshContext, -) => Request | VNode | null | Promise { +) => Response | VNode | null | Promise { return fn; }