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`.
This commit is contained in:
Asher Gomez
2025-06-12 13:25:36 +02:00
committed by GitHub
parent e9cb6486c8
commit e868a924fa
+2 -2
View File
@@ -46,10 +46,10 @@ export type Handler<T = any, State = Record<string, unknown>> = HandlerFn<
function defineFn<State>(
fn: (
ctx: FreshContext<State>,
) => Request | VNode | null | Promise<Request | VNode | null>,
) => Response | VNode | null | Promise<Response | VNode | null>,
): (
ctx: FreshContext<State>,
) => Request | VNode | null | Promise<Request | VNode | null> {
) => Response | VNode | null | Promise<Response | VNode | null> {
return fn;
}