Skip to main content

Storage <TKey>

Implements

  • SimpleStorage

Index

Constructors

constructor

  • new Storage<TKey>(options: StorageOptions): Storage<TKey>
  • Type parameters

    • TKey: string = string

    Parameters

    • options: StorageOptions

    Returns Storage<TKey>

Properties

readonlyprefix

prefix: string

Methods

getItem

  • getItem(key: TKey): string
  • Parameters

    • key: TKey

    Returns string

join

  • join<TKeyOverride>(path: string): Storage<TKeyOverride extends void ? TKey : TKeyOverride>
  • Type parameters

    • TKeyOverride: string | void = void

    Parameters

    • path: string

    Returns Storage<TKeyOverride extends void ? TKey : TKeyOverride>

removeItem

  • removeItem(key: TKey): void
  • Parameters

    • key: TKey

    Returns void

setItem

  • setItem(key: TKey, value: string): void
  • Parameters

    • key: TKey
    • value: string

    Returns void