Skip to content

Commit

Permalink
chore: rename type
Browse files Browse the repository at this point in the history
  • Loading branch information
TkDodo committed Apr 24, 2023
1 parent 1db7e24 commit fba755a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/query-core/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ export interface InfiniteQueryPageParamsOptions<
getNextPageParam: GetNextPageParamFunction<TPageParam, TQueryFnData>
}

export type throwOnError<
export type ThrowOnError<
TQueryFnData,
TError,
TQueryData,
Expand Down Expand Up @@ -266,7 +266,7 @@ export interface QueryObserverOptions<
* If set to a function, it will be passed the error and the query, and it should return a boolean indicating whether to show the error in an error boundary (`true`) or return the error as state (`false`).
* Defaults to `false`.
*/
throwOnError?: throwOnError<TQueryFnData, TError, TQueryData, TQueryKey>
throwOnError?: ThrowOnError<TQueryFnData, TError, TQueryData, TQueryKey>
/**
* This option can be used to transform or select a part of the data returned by the query function.
*/
Expand Down
4 changes: 2 additions & 2 deletions packages/react-query/src/errorBoundaryUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import type {
Query,
QueryKey,
QueryObserverResult,
throwOnError,
ThrowOnError,
} from '@tanstack/query-core'
import type { QueryErrorResetBoundaryValue } from './QueryErrorResetBoundary'
import * as React from 'react'
Expand Down Expand Up @@ -56,7 +56,7 @@ export const getHasError = <
}: {
result: QueryObserverResult<TData, TError>
errorResetBoundary: QueryErrorResetBoundaryValue
throwOnError: throwOnError<TQueryFnData, TError, TQueryData, TQueryKey>
throwOnError: ThrowOnError<TQueryFnData, TError, TQueryData, TQueryKey>
query: Query<TQueryFnData, TError, TQueryData, TQueryKey>
}) => {
return (
Expand Down

0 comments on commit fba755a

Please sign in to comment.