Skip to content

Commit d8e4789

Browse files
committed
ref(core): remove leftover setStateOptions
1 parent 5ccd597 commit d8e4789

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
@@ -137,7 +137,6 @@ interface ContinueAction {
137137
interface SetStateAction<TData, TError> {
138138
type: 'setState'
139139
state: Partial<QueryState<TData, TError>>
140-
setStateOptions?: SetStateOptions
141140
}
142141

143142
export type Action<TData, TError> =
@@ -150,10 +149,6 @@ export type Action<TData, TError> =
150149
| SetStateAction<TData, TError>
151150
| SuccessAction<TData>
152151

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

159154
export class Query<
@@ -241,11 +236,8 @@ export class Query<
241236
return data
242237
}
243238

244-
setState(
245-
state: Partial<QueryState<TData, TError>>,
246-
setStateOptions?: SetStateOptions,
247-
): void {
248-
this.#dispatch({ type: 'setState', state, setStateOptions })
239+
setState(state: Partial<QueryState<TData, TError>>): void {
240+
this.#dispatch({ type: 'setState', state })
249241
}
250242

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

0 commit comments

Comments
 (0)