Created
December 2, 2019 20:48
-
-
Save mtiller/587f888de2cdaa76ee91939b85899151 to your computer and use it in GitHub Desktop.
Sample types generated for react-query
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export function ReactQueryConfigProvider({ config, children }: { | |
config: any; | |
children: any; | |
}): JSX.Element; | |
export function useQuery(queryKey: any, queryFn: any, config?: {}): any; | |
export function prefetchQuery(queryKey: any, queryFn: any, config?: {}): Promise<any>; | |
export function refetchQuery(queryKey: any, config?: {}): Promise<void[] | undefined>; | |
export function useMutation(mutationFn: any, { refetchQueries, refetchQueriesOnFailure }?: { | |
refetchQueries: any; | |
refetchQueriesOnFailure: any; | |
}): (((variables: any, { updateQuery, waitForRefetchQueries }?: any) => Promise<any>) | { | |
data: null; | |
isLoading: boolean; | |
error: null; | |
})[]; | |
export function useIsFetching(): boolean; | |
export function setQueryData(userQueryKey: any, updater: any, { shouldRefetch }?: { | |
shouldRefetch?: boolean | undefined; | |
}): Promise<void[] | undefined> | undefined; | |
export function refetchAllQueries({ includeInactive, force, }?: { | |
includeInactive: any; | |
force?: any; | |
}): Promise<any[]>; | |
export function clearQueryCache(): void; | |
export function stableStringify(obj: any): string; | |
export let queries: any[]; | |
export let globalStateListeners: any[]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment