Skip to content

Commit

Permalink
fix(types): ReactQueryConfigProvider error type (#560)
Browse files Browse the repository at this point in the history
This fixes #542 by allowing the `<ReactQueryConfigProvider>` to get the generic error type.
  • Loading branch information
thebuilder committed Jun 8, 2020
1 parent 4261a65 commit 94cdeb5
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions types/index.d.ts
Expand Up @@ -743,9 +743,10 @@ export const ReactQueryCacheProvider: React.ComponentType<{
*/
export function useIsFetching(): number

export const ReactQueryConfigProvider: React.ComponentType<{
config?: ReactQueryProviderConfig
}>
export function ReactQueryConfigProvider<TError = Error>(props: {
config?: ReactQueryProviderConfig<TError>;
children?: React.ReactNode;
}): React.ReactElement;

export interface ReactQueryProviderConfig<TError = Error> extends BaseQueryOptions<TError> {
/** Defaults to the value of `suspense` if not defined otherwise */
Expand Down

0 comments on commit 94cdeb5

Please sign in to comment.