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:
+2
-2
@@ -46,10 +46,10 @@ export type Handler<T = any, State = Record<string, unknown>> = HandlerFn<
|
|||||||
function defineFn<State>(
|
function defineFn<State>(
|
||||||
fn: (
|
fn: (
|
||||||
ctx: FreshContext<State>,
|
ctx: FreshContext<State>,
|
||||||
) => Request | VNode | null | Promise<Request | VNode | null>,
|
) => Response | VNode | null | Promise<Response | VNode | null>,
|
||||||
): (
|
): (
|
||||||
ctx: FreshContext<State>,
|
ctx: FreshContext<State>,
|
||||||
) => Request | VNode | null | Promise<Request | VNode | null> {
|
) => Response | VNode | null | Promise<Response | VNode | null> {
|
||||||
return fn;
|
return fn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user