* Tear down the watcher, timers, and in-process subscription. Called when * the last subscriber unsubscribes. Preserves #tasks/#hidden cache so a * subsequent re-subscribe renders the last known state immediately.
()
| 184 | * subsequent re-subscribe renders the last known state immediately. |
| 185 | */ |
| 186 | #stop(): void { |
| 187 | this.#watcher?.close() |
| 188 | this.#watcher = null |
| 189 | this.#watchedDir = null |
| 190 | this.#unsubscribeTasksUpdated?.() |
| 191 | this.#unsubscribeTasksUpdated = null |
| 192 | this.#clearHideTimer() |
| 193 | if (this.#debounceTimer) clearTimeout(this.#debounceTimer) |
| 194 | if (this.#pollTimer) clearTimeout(this.#pollTimer) |
| 195 | this.#debounceTimer = null |
| 196 | this.#pollTimer = null |
| 197 | this.#started = false |
| 198 | } |
| 199 | } |
| 200 | |
| 201 | let _store: TasksV2Store | null = null |
no test coverage detected