Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/wet-lands-wait.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@tanstack/query-core': patch
---

ref(core): remove leftover setStateOptions
12 changes: 2 additions & 10 deletions packages/query-core/src/query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@ interface ContinueAction {
interface SetStateAction<TData, TError> {
type: 'setState'
state: Partial<QueryState<TData, TError>>
setStateOptions?: SetStateOptions
}

export type Action<TData, TError> =
Expand All @@ -151,10 +150,6 @@ export type Action<TData, TError> =
| SetStateAction<TData, TError>
| SuccessAction<TData>

export interface SetStateOptions {
meta?: any
}

// CLASS

export class Query<
Expand Down Expand Up @@ -251,11 +246,8 @@ export class Query<
return data
}

setState(
state: Partial<QueryState<TData, TError>>,
setStateOptions?: SetStateOptions,
): void {
this.#dispatch({ type: 'setState', state, setStateOptions })
setState(state: Partial<QueryState<TData, TError>>): void {
this.#dispatch({ type: 'setState', state })
}

cancel(options?: CancelOptions): Promise<void> {
Expand Down
Loading