Rindle

API index and search · Build metadata

Supporting declarations

packages/optimistic/src/client-id.ts. These declarations explain referenced types. Only package-page symbols are package exports.

Exact source

resetTabInstanceForTests

/** Test-only: reset the per-load instance counter to simulate a fresh page load. Deliberately NOT
 *  re-exported from the package barrel. */
export declare function resetTabInstanceForTests(): void;

resetStableClientID

/** Clear the persisted client identity so the next page load starts a fresh mid/lmid stream.
 *  Intended for dev recovery after out-of-band server state loss, not for normal operation. */
export declare function resetStableClientID(): void;

sessionTicketPersistence

/** A sessionStorage-backed {@link TicketPersistence} for the affinity ticket — per-tab, survives a
 *  reload (see {@link AFFINITY_TICKET_KEY}). Every access tolerates web storage being absent (SSR,
 *  private mode): the store then behaves as pure in-memory, re-anycasting on each fresh load. */
export declare function sessionTicketPersistence(): TicketPersistence;

stableClientID

/** The connection's stable clientID. A per-origin base (localStorage) keeps one logical identity
 *  across reloads; a per-tab suffix (sessionStorage) gives each tab its OWN mid/lmid stream; a
 *  per-load instance suffix keeps two clients constructed in ONE tab from sharing that stream. Falls
 *  back to a fresh random id when web storage is unavailable.
 *
 *  Note: an explicit "duplicate tab" copies sessionStorage, so the clone briefly shares its source's
 *  suffix until reloaded — the one residual case of the shared-clientID collision. */
export declare function stableClientID(): string;