gun
Version:
A realtime, decentralized, offline-first, graph data synchronization engine.
9 lines (8 loc) • 366 B
TypeScript
export interface ISerializer<T, S> {
id: string;
isType: (o: any) => boolean;
toObject?: (t: T) => Promise<S>;
fromObject?: (o: S) => Promise<T>;
}
export declare function toObjects(serializers: Array<ISerializer<any, any>>, o: any): Promise<any>;
export declare function fromObjects(serializers: Array<ISerializer<any, any>>, o: any): Promise<any>;