import { Clock, Doc, ChangeFn } from 'automerge'; import { RepoFrontend, ProgressEvent } from './RepoFrontend'; import { DocUrl } from './Misc'; export declare class Handle { url: DocUrl; state: Doc | null; clock: Clock | null; subscription?: (item: Doc, clock?: Clock, index?: number) => void; progressSubscription?: (event: ProgressEvent) => void; messageSubscription?: (event: any) => void; private counter; private repo; constructor(repo: RepoFrontend, url: DocUrl); fork(): DocUrl; merge(other: Handle): this; message: (contents: any) => this; push: (item: Doc, clock: Clock) => void; receiveProgressEvent: (progress: ProgressEvent) => void; receiveDocumentMessage: (contents: any) => void; once: (subscriber: (doc: Doc, clock?: Clock | undefined, index?: number | undefined) => void) => this; subscribe: (subscriber: (doc: Doc, clock?: Clock | undefined, index?: number | undefined) => void) => this; subscribeProgress: (subscriber: (event: ProgressEvent) => void) => this; subscribeMessage: (subscriber: (event: any) => void) => this; close: () => void; debug(): void; cleanup: () => void; changeFn: (_fn: ChangeFn) => void; change: (fn: ChangeFn) => this; }