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:
Matteo Frana
2019-12-23 17:25:06 +01:00
committed by Andrew Branch
parent 924bcd457f
commit 7b2a852371

View File

@@ -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> {