import { IDisposable } from '@lumino/disposable' ; import { Datastore } from './datastore' ; /**
 * An interface for a bridge between a datastore and a patch server.
 * Patch servers should expose an interface like this one, which mediates
 * outgoing patches from a given store, and delivers incoming patches to a
 * store.
 */ export interface IServerAdapter extends IDisposable { param transaction broadcast ( transaction ) : void ; param id undo ( id ) : Promise < void > ; param id redo ( id ) : Promise < void > ; /**
     * A callback to be invoked when a remote transaction is received by the
     * server adapter.
     */ onRemoteTransaction : ( ( transaction : Datastore . Transaction ) => void ) | null ; /**
     * A callback to be invoked when an undo message is received by the server
     * adapter.
     */ onUndo : ( ( transaction : Datastore . Transaction ) => void ) | null ; /**
     * A callback to be invoked when an redo message is received by the server
     * adapter.
     */ onRedo : ( ( transaction : Datastore . Transaction ) => void ) | null ; }