Skip to content

Commit 310029d

Browse files
committed
Changed 77 solution
1 parent 55dffa4 commit 310029d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/09-external-libraries/77-react-query-wrapper.solution.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
import {
2-
QueryFunctionContext,
3-
QueryKey,
42
useQuery,
3+
QueryKey,
4+
QueryFunctionContext,
55
} from "@tanstack/react-query";
66
import { useAuthToken } from "fake-external-lib";
77
import { Equal, Expect } from "../helpers/type-utils";
88

9-
const useApi = <TData, TQueryKey extends QueryKey>(
9+
const useApi = <TQueryKey extends QueryKey, TQueryFnData>(
1010
queryKey: TQueryKey,
1111
queryFn: (
12-
key: QueryFunctionContext<TQueryKey>,
12+
ctx: QueryFunctionContext<TQueryKey>,
1313
token: string,
14-
) => Promise<TData>,
14+
) => Promise<TQueryFnData>,
1515
) => {
1616
const token = useAuthToken();
1717

0 commit comments

Comments
 (0)