Skip to content

Commit 645d5d1

Browse files
authored
ref(core): remove leftover setStateOptions (#10574)
1 parent d6a7bf3 commit 645d5d1

2 files changed

Lines changed: 7 additions & 10 deletions

File tree

.changeset/wet-lands-wait.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@tanstack/query-core': patch
3+
---
4+
5+
ref(core): remove leftover setStateOptions

packages/query-core/src/query.ts

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,6 @@ interface ContinueAction {
138138
interface SetStateAction<TData, TError> {
139139
type: 'setState'
140140
state: Partial<QueryState<TData, TError>>
141-
setStateOptions?: SetStateOptions
142141
}
143142

144143
export type Action<TData, TError> =
@@ -151,10 +150,6 @@ export type Action<TData, TError> =
151150
| SetStateAction<TData, TError>
152151
| SuccessAction<TData>
153152

154-
export interface SetStateOptions {
155-
meta?: any
156-
}
157-
158153
// CLASS
159154

160155
export class Query<
@@ -251,11 +246,8 @@ export class Query<
251246
return data
252247
}
253248

254-
setState(
255-
state: Partial<QueryState<TData, TError>>,
256-
setStateOptions?: SetStateOptions,
257-
): void {
258-
this.#dispatch({ type: 'setState', state, setStateOptions })
249+
setState(state: Partial<QueryState<TData, TError>>): void {
250+
this.#dispatch({ type: 'setState', state })
259251
}
260252

261253
cancel(options?: CancelOptions): Promise<void> {

0 commit comments

Comments
 (0)