Skip to content
Source
Sign inSign up
TanStack/query

refactor(query-core): remove the internal behavior query option #12705

Mergedbenjavicente(GitHub profile, opens in a new tab)merged 1 commit intoquery-v6 fromrefs/pull/12705/headmerged by TkDodo View on GitHub

Showing 5 changed files with 5 additions and 33 deletions (loading 2).

x
0 of 5 viewed, 5 left
5 additions and 0 deletions.changeset/remove-query-behavior-option.mdAdded
View file
@@ -0,0 +1,5 @@
+---
+'@tanstack/query-core': patch
+---
+​
+Remove the internal `behavior` query option. Infinite queries install their own fetch behavior, so nothing set it anymore.
0 additions and 32 deletionspackages/query-core/src/__tests__/infiniteQueryObserver.test-d.tsxModified
View file
@@ -23,7 +23,6 @@
QueryObserverResult,
QueryPersister,
} from '..'
-import type { QueryBehavior } from '../query'
​
class CustomError extends Error {
override name = 'CustomError' as const
@@ -201,37 +200,6 @@
​
- describe('behavior', () => {
- it('should be typed from the paged data it produces', () => {
- expectTypeOf<
- InfiniteQueryObserverOptions<
- { value: string },
- CustomError,
- InfiniteData<{ value: string }, number>,
- ReadonlyArray<unknown>,
- number