UNPKG

@upcodee/store

Version:

Store is TS library for loading data from remote and local sources based on Kotlin library Store 4 from Dropbox

9 lines (8 loc) 306 B
import { Observable } from "rxjs"; export declare type EMPTY_CACHE = "EMPTY_CACHE"; export interface SourceOfTruth<Key, Value> { reader(key: Key): Observable<Value | EMPTY_CACHE>; writer(key: Key, input: Value): Promise<void>; delete(key: Key): Promise<void>; deleteAll(): Promise<void>; }