Hierarchy

Methods

Methods

  • Get config from the state

    Returns

    the config

    Type Parameters

    • T = any

    Parameters

    • key: string

      name of the key containing the config

    Returns T

  • Check if a config exists

    Returns

    true if config exists

    Parameters

    • key: string

      name of the key containing the config

    Returns boolean

  • Beta

    Set config

    Returns

    a promise that will be resolved when the config has been saved

    Type Parameters

    • T = any

    Parameters

    • key: string

      name of the key containing the config

    • data: T

      the config data

    Returns Promise<void>

  • Subscribe to state changes

    Returns

    unsubscribe callback

    Parameters

    • callback: ((...args: unknown[]) => void)

      function to call when subscription updates

        • (...args: unknown[]): void
        • Parameters

          • Rest ...args: unknown[]

          Returns void

    • Optional options: StateOptions

      options for the state selector

    Returns (() => void)

      • (): void
      • Subscribe to state changes

        Returns

        unsubscribe callback

        Returns void