diff --git a/.changeset/wet-lands-wait.md b/.changeset/wet-lands-wait.md new file mode 100644 index 00000000000..e102a8ec888 --- /dev/null +++ b/.changeset/wet-lands-wait.md @@ -0,0 +1,5 @@ +--- +'@tanstack/query-core': patch +--- + +ref(core): remove leftover setStateOptions diff --git a/packages/query-core/src/query.ts b/packages/query-core/src/query.ts index 721c0019426..62bc9a16082 100644 --- a/packages/query-core/src/query.ts +++ b/packages/query-core/src/query.ts @@ -138,7 +138,6 @@ interface ContinueAction { interface SetStateAction { type: 'setState' state: Partial> - setStateOptions?: SetStateOptions } export type Action = @@ -151,10 +150,6 @@ export type Action = | SetStateAction | SuccessAction -export interface SetStateOptions { - meta?: any -} - // CLASS export class Query< @@ -251,11 +246,8 @@ export class Query< return data } - setState( - state: Partial>, - setStateOptions?: SetStateOptions, - ): void { - this.#dispatch({ type: 'setState', state, setStateOptions }) + setState(state: Partial>): void { + this.#dispatch({ type: 'setState', state }) } cancel(options?: CancelOptions): Promise {