An observable storage provider that supports asynchronous storage of arbitrary data as strings

interface IObservableStorageProvider {
    getItem(key): null | string | Promise<null | string>;
    removeItem(key): void | Promise<string> | Promise<void>;
    setItem(key, value): string | void | Promise<string> | Promise<void>;
    subscribe(key, subscriber): StorageSubscription;
}

Hierarchy (view full)

Methods

  • Parameters

    • key: string
    • subscriber: StorageProviderSubscriber

    Returns StorageSubscription