export default interface Storage { queryItems(): Promise saveItem(item: T): Promise deleteItem(item: T): Promise } export interface Collection { items: T[], lastModifiedBy: string, lastModifiedAt: Date, } export type Serializer = (t: T) => string export type Deserializer = (s: string) => T export class OutOfSyncError {}