Skip to content

SiUIStateService documentation

Service to save and load UI states.

Attributes and Methods

NameTypeDefaultDescription
load(...)
<TState: unknown> (stateId: string, version: number = 0) => PromiseLike<(undefined | TState)>Loads and returns the state for the given stateId and version.
Returns A Promise containing the state or undefined if the state does not exist or the version did not match.

Parameters
  • stateId: string  The unique id or key for which the state shall be loaded.
  • version: number = 0  The version of the state object. This can be used to migrate state objects.
save(...)
<TState> (stateId: string, state: TState, version: number = 0) => Promise<void>Saves the provided state in the storage.

Parameters
  • stateId: string  The unique id or key under which the state shall be saved.
  • state: TState  The state to be saved.
  • version: number = 0  The version of the state object. This can be used to migrate state objects.

Types Documentation

No types to document for items on this page.


Except where otherwise noted, content on this site is licensed under MIT License.