Documentation
    Preparing search index...

    Interface IStorage

    Imitation of the localStorage.

    interface IStorage {
        getItem(key: string): Promise<null | string>;
        removeItem(key: string): Promise<void>;
        setItem(key: string, value: string): Promise<void>;
    }
    Index

    Methods

    • Reads the value from the storage. Implementation may use backend as a storage due to the fact that the function returns a promise.

      Parameters

      • key: string

        key to access the value.

      Returns Promise<null | string>

    • Removes the value from the storage. Implementation may use backend as a storage due to the fact that the function returns a promise.

      Parameters

      • key: string

        key to access the value.

      Returns Promise<void>

    • Saves the value to the storage. Value can be accessed later by the key. Implementation may use backend as a storage due to the fact that the function returns a promise.

      Parameters

      • key: string

        key to access to the value later.

      • value: string

        value to save.

      Returns Promise<void>