Class

SessionState

SessionState(storageKey)

Manages session state persistence using localStorage.
Constructor

# new SessionState(storageKey)

Creates an instance of SessionState.
Parameters:
Name Type Description
storageKey string The key used to store session state in localStorage.

View Source lib/events/SessionState.ts, line 8

Classes

SessionState
SessionState

Methods

# load() → {State}

Loads the current session state from localStorage.

View Source lib/events/SessionState.ts, line 63

The parsed session state or a default state if not found.
State

# save(session) → {void}

Saves the session state to localStorage.
Parameters:
Name Type Description
session State | null The session state to save. If null, the default state is used.

View Source lib/events/SessionState.ts, line 71

void