mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-06-28 14:20:12 +00:00
react-query: updated QueryOptions definitions (#41208)
* QueryOptions: added refetchIntervalInBackground, refetchOnWindowFocus, initialData * Removed extra space * Removed patch version number * Fixed initialData optional and of type TResult
This commit is contained in:
committed by
Andrew Branch
parent
924bcd457f
commit
7b2a852371
4
types/react-query/index.d.ts
vendored
4
types/react-query/index.d.ts
vendored
@@ -2,6 +2,7 @@
|
||||
// Project: https://github.com/tannerlinsley/react-query
|
||||
// Definitions by: Lukasz Fiszer <https://github.com/lukaszfiszer>
|
||||
// Jace Hensley <https://github.com/jacehensley>
|
||||
// Matteo Frana <https://github.com/matteofrana>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
import { ComponentType } from 'react';
|
||||
@@ -31,9 +32,12 @@ export interface QueryOptions<TResult> {
|
||||
staleTime?: number;
|
||||
cacheTime?: number;
|
||||
refetchInterval?: false | number;
|
||||
refetchIntervalInBackground?: boolean;
|
||||
refetchOnWindowFocus?: boolean;
|
||||
onError?: (err: any) => void;
|
||||
onSuccess?: (data: TResult) => void;
|
||||
suspense?: boolean;
|
||||
initialData?: TResult;
|
||||
}
|
||||
|
||||
export interface QueryOptionsPaginated<TResult> extends QueryOptions<TResult> {
|
||||
|
||||
Reference in New Issue
Block a user