()
| 62 | } |
| 63 | |
| 64 | protected onSubscribe(): void { |
| 65 | if (this.listeners.size === 1) { |
| 66 | this.#observers.forEach((observer) => { |
| 67 | observer.subscribe((result) => { |
| 68 | this.#onUpdate(observer, result) |
| 69 | }) |
| 70 | }) |
| 71 | } |
| 72 | } |
| 73 | |
| 74 | protected onUnsubscribe(): void { |
| 75 | if (!this.listeners.size) { |