🗳️Code Style
제네릭 규약
// src/types/module/react-query/use-infinite-query-params.ts
/**
* example : const useAnyQuery = ({ options, variables } : UseInfiniteQueryParams<typeof anyApiFn>) => {...}
*/
export type UseQueryParams<
T extends AsyncFn,
Error = AxiosError<any>,
Data = AsyncFnReturn<T>,
Variables = Parameter<T>,
> = {
options?: Omit<UseQueryOptions<Data, Error>, 'queryKey' | 'queryFn'>;
} & WrapVariables<Variables>;
Last updated