(online: boolean)
| 53 | } |
| 54 | |
| 55 | setOnline(online: boolean): void { |
| 56 | const changed = this.#online !== online |
| 57 | |
| 58 | if (changed) { |
| 59 | this.#online = online |
| 60 | this.listeners.forEach((listener) => { |
| 61 | listener(online) |
| 62 | }) |
| 63 | } |
| 64 | } |
| 65 | |
| 66 | isOnline(): boolean { |
| 67 | return this.#online |
no test coverage detected