Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import * as RichText from 'rich-text';
import { fromEvent, Observable, of, Subject, merge } from 'rxjs';
import { filter, map } from 'rxjs/operators';
import { Doc, OTType, Snapshot, types } from 'sharedb/lib/client';
types.register(RichText.type);
/**
* This interface represents a realtime document. Realtime documents can be concurrently updated by multiple users. The
* realtime document is synchronized in realtime for all users.
*/
export interface RealtimeDoc {
readonly id: string;
readonly data: any;
readonly version: number;
readonly type: OTType;
readonly pendingOps: any[];
idle(): Observable;
fetch(): Promise;
ingestSnapshot(snapshot: Snapshot): Promise;
subscribe(): Promise;