mirror of
https://github.com/hanzoai/agency.git
synced 2026-11-02 19:13:28 +00:00
17 lines
521 B
Plaintext
17 lines
521 B
Plaintext
import { Subscribable } from './subscribable.js';
|
|
|
|
type Listener = (online: boolean) => void;
|
|
type SetupFn = (setOnline: Listener) => (() => void) | undefined;
|
|
declare class OnlineManager extends Subscribable<Listener> {
|
|
#private;
|
|
constructor();
|
|
protected onSubscribe(): void;
|
|
protected onUnsubscribe(): void;
|
|
setEventListener(setup: SetupFn): void;
|
|
setOnline(online: boolean): void;
|
|
isOnline(): boolean;
|
|
}
|
|
declare const onlineManager: OnlineManager;
|
|
|
|
export { OnlineManager, onlineManager };
|