()
| 308 | } |
| 309 | |
| 310 | #notify(): void { |
| 311 | if (this.hasListeners()) { |
| 312 | const shouldSkipCombine = this.#shouldSkipCombine() |
| 313 | const previousResult = this.#combinedResult |
| 314 | const newResult = shouldSkipCombine |
| 315 | ? previousResult |
| 316 | : this.#combineResult( |
| 317 | this.#trackResult(this.#result, this.#observerMatches), |
| 318 | this.#options?.combine, |
| 319 | ) |
| 320 | |
| 321 | if (shouldSkipCombine || previousResult !== newResult) { |
| 322 | notifyManager.batch(() => { |
| 323 | this.listeners.forEach((listener) => { |
| 324 | listener(this.#result) |
| 325 | }) |
| 326 | }) |
| 327 | } |
| 328 | } |
| 329 | } |
| 330 | } |
| 331 | |
| 332 | type QueryObserverMatch = { |
no test coverage detected