Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • LocaleKVStorage

Index

Properties

Properties

get: <T>(key: string, ...args: unknown[]) => CanUndef<T>

Type declaration

    • <T>(key: string, ...args: unknown[]): CanUndef<T>
    • Returns a value from the storage by the specified key.

      The returning value automatically parses by using Object.parse from a string to equivalent JS value, i.e., '1' will be parsed to 1, 'true' to true, '2021-07-09T08:15:57.753Z' to Date, etc.

      Notice, the method can take a list of additional parameters provided to the used storage' engine.

      Type parameters

      • T = unknown

      Parameters

      • key: string
      • Rest ...args: unknown[]

      Returns CanUndef<T>

set?: (key: string, value: unknown, ...args: unknown[]) => void

Type declaration

    • (key: string, value: unknown, ...args: unknown[]): void
    • Saves a value to the storage by the specified key.

      The value to parse automatically serializes to a string by using Object.trySerialize, i.e., arrays and dictionaries will be serialized to JSON, etc.

      Notice, the method can take a list of additional parameters provided to the used storage' engine.

      Parameters

      • key: string
      • value: unknown
      • Rest ...args: unknown[]

      Returns void