export type SessionIdClaimChannel = {
    onmessage: ((event: MessageEvent<unknown>) => void) | null;
    postMessage: (message: unknown) => void;
    close: () => void;
};
export type SessionIdClaim = {
    resolvedSessionId: Promise<string>;
    updateSessionId: (sessionId: string) => void;
    close: () => void;
};
/**
 * Claims a stored editor session id for this tab.
 *
 * Browsers copy sessionStorage into a duplicated/new child tab. Without this
 * handshake, both tabs reuse the copied id and alternately overwrite the same
 * server-side session's current item. Existing tabs answer probes for their id;
 * a colliding tab then creates a new id before EditorShell is mounted.
 */
export declare function claimEditorSessionId(initialSessionId: string, createSessionId: () => string, options?: {
    createChannel?: () => SessionIdClaimChannel | null;
    settleMs?: number;
}): SessionIdClaim;
