fix: broken session type

This commit is contained in:
Bereket Engida
2024-12-08 17:10:10 +03:00
parent b3a7cc9fff
commit f36a54885e

View File

@@ -38,12 +38,12 @@ export type InferSessionAPI<API> = API extends {
disableCookieCache?: boolean;
};
asResponse?: R;
}) => R extends true
? Promise<Response>
: Promise<PrettifyDeep<Awaited<ReturnType<E>>>> & {
}) => false extends R
? Promise<PrettifyDeep<Awaited<ReturnType<E>>>> & {
options: E["options"];
path: E["path"];
};
}
: Promise<Response>;
}
: never
: never