histoire
Version:
A fast story book powered by Vite
15 lines • 727 B
TypeScript
import type { UiChannelClient } from './types.js';
/** Request-scoped view of one browser socket's live connection. */
export interface UiClientConnection {
/** Report open state and deliver close notification at most once. */
isOpen: () => boolean;
/** Remove the listener and suppress future notifications. */
dispose: () => void;
}
/**
* Observe one open socket before work is admitted; closed sockets start closed.
* @param client Socket owner being observed.
* @param onDisconnect Called once when an observed open socket closes.
*/
export declare function observeUiClientConnection(client: UiChannelClient, onDisconnect: () => void): UiClientConnection;
//# sourceMappingURL=client-connection.d.ts.map