@inworld/web-core
Version:
26 lines (25 loc) • 973 B
TypeScript
import { InworldPacket } from '../entities/packets/inworld_packet.entity.js';
import { ConnectionService } from './connection.service.js';
import { StateSerializationService } from './wrappers/state_serialization.service.js';
export declare class SessionStateService<InworldPacketT extends InworldPacket = InworldPacket> {
private connection;
private stateSerialization;
private autoSaveIntervalId;
private maxAttempts;
private interactionEndTimeout;
private isBlurred;
private isSaving;
private doNotSave;
private sessionId;
constructor(connection: ConnectionService, stateSerialization: StateSerializationService<InworldPacketT>);
clear(): void;
destroy(): void;
static loadSessionState(): string;
private onWindowBlur;
private onWindowFocus;
private tryToSaveState;
private saveSessionState;
private setAutoSaveInterval;
private clearAutoSaveInterval;
private clearInteractionEndTimeout;
}