jsketcher/web/app/cad/repository/storage.ts
2020-05-16 22:22:02 -07:00

20 lines
No EOL
400 B
TypeScript

import {Observable} from "lstream";
export interface StorageUpdateEvent {
path: string;
timestamp: number
}
export interface Storage extends Observable<StorageUpdateEvent> {
set(path: string, content: string): Promise<void>;
get(path: string): Promise<string>;
remove(path: string): Promise<void>;
list(path: string): Promise<string[]>;
exists(path: string): Promise<boolean>;
}