import type { FsDuplexBrowserHelper } from "./browser.js"; /** * Reads the heartbeat file in Node.js to check for liveness. */ export declare class NodeHeartbeatReader { private filepath; constructor(filepath: string); /** * Checks if the heartbeat timestamp is recent. * @param timeout The maximum allowed age of the heartbeat in milliseconds. * @returns True if the peer is considered alive, false otherwise. */ isAlive(timeout: number): Promise; } /** * Writes the heartbeat file periodically in the Browser. */ export declare class BrowserHeartbeatWriter { private filename; private helper; private interval; private timer; constructor(filename: string, helper: FsDuplexBrowserHelper, interval?: number); /** * Starts the periodic writing of the heartbeat file. */ start(): void; /** * Stops writing the heartbeat. */ stop(): void; private _writeHeartbeat; } //# sourceMappingURL=heartbeat.d.ts.map