()
| 84 | } |
| 85 | |
| 86 | protected onSubscribe(): void { |
| 87 | if (this.listeners.size === 1) { |
| 88 | this.#observers.forEach((observer) => { |
| 89 | observer.subscribe((result) => { |
| 90 | this.#onUpdate(observer, result) |
| 91 | }) |
| 92 | }) |
| 93 | } |
| 94 | } |
| 95 | |
| 96 | protected onUnsubscribe(): void { |
| 97 | if (!this.listeners.size) { |