MCPcopy Create free account
hub / github.com/TanStack/query / removeObserver

Method removeObserver

packages/query-core/src/mutation.ts:200–210  ·  view source on GitHub ↗

@internal

(observer: MutationObserver<any, any, any, any>)

Source from the content-addressed store, hash-verified

198
199 /** @internal */
200 removeObserver(observer: MutationObserver<any, any, any, any>): void {
201 this.#observers = this.#observers.filter((x) => x !== observer)
202
203 this.scheduleGc()
204
205 this.#mutationCache.notify({
206 type: 'observerRemoved',
207 mutation: this,
208 observer,
209 })
210 }
211
212 protected optionalRemove() {
213 if (!this.#observers.length) {

Callers

nothing calls this directly

Calls 1

notifyMethod · 0.45

Tested by

no test coverage detected