Skip to content

UIStateStorage Type documentation

TypeScript declaration

import type { UIStateStorage } from '@siemens/element-ng/common';

Interface that defines a UIStateStore. It must be provided via provideSiUiState.

Methods
  • load (stateId: string) => string | Promise<string | null | undefined> | null | undefined

    Loads data for a specific stateId. Can be asynchronous.

    Errors should be handled by the implementation. The SiUIStateService does not handle errors.

    Returns: The data or undefined if the data does not exist. Asynchronous implementations must return a Promise containing the data.

    Parameters
  • save (stateId: string, data: string) => void | Promise<void>

    Saves data under a specific stateId. Already existing data for that stateId should be overridden. Asynchronous implementations must return a Promise and resolve it once saving was completed.

    Errors should be handled by the implementation. The SiUIStateService does not handle errors.

    Parameters


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