MCPcopy Index your code
hub / github.com/TanStack/query / removeObserver

Method removeObserver

packages/query-core/src/mutation.ts:143–153  ·  view source on GitHub ↗
(observer: MutationObserver<any, any, any, any>)

Source from the content-addressed store, hash-verified

141 }
142
143 removeObserver(observer: MutationObserver<any, any, any, any>): void {
144 this.#observers = this.#observers.filter((x) => x !== observer)
145
146 this.scheduleGc()
147
148 this.#mutationCache.notify({
149 type: 'observerRemoved',
150 mutation: this,
151 observer,
152 })
153 }
154
155 protected optionalRemove() {
156 if (!this.#observers.length) {

Callers

nothing calls this directly

Calls 1

notifyMethod · 0.45

Tested by

no test coverage detected