From 7b2a852371796a2a3ac76ea59cf251df227f475d Mon Sep 17 00:00:00 2001 From: Matteo Frana <46195306+matteofrana@users.noreply.github.com> Date: Mon, 23 Dec 2019 17:25:06 +0100 Subject: [PATCH] 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 --- types/react-query/index.d.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/types/react-query/index.d.ts b/types/react-query/index.d.ts index 2664dd35de..e8c79b24e7 100644 --- a/types/react-query/index.d.ts +++ b/types/react-query/index.d.ts @@ -2,6 +2,7 @@ // Project: https://github.com/tannerlinsley/react-query // Definitions by: Lukasz Fiszer // Jace Hensley +// Matteo Frana // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped import { ComponentType } from 'react'; @@ -31,9 +32,12 @@ export interface QueryOptions { 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 extends QueryOptions {