A wrapper around the conf package that provides a strongly-typed interface for accessing the local storage.

Type Parameters

  • T extends { [key: string]: any }

Constructors

Methods

Constructors

Methods

  • Delete a value from the local storage.

    Type Parameters

    • TKey extends string | number | symbol

    Parameters

    • key: TKey

      The key to delete.

    Returns void

    AbortError if a permission error occurs.

    BugError if an unexpected error occurs.

  • Get a value from the local storage.

    Type Parameters

    • TKey extends string | number | symbol

    Parameters

    • key: TKey

      The key to get.

    Returns undefined | T[TKey]

    The value.

    AbortError if a permission error occurs.

    BugError if an unexpected error occurs.

  • Set a value in the local storage.

    Type Parameters

    • TKey extends string | number | symbol

    Parameters

    • key: TKey

      The key to set.

    • Optionalvalue: T[TKey]

      The value to set.

    Returns void

    AbortError if a permission error occurs.

    BugError if an unexpected error occurs.