import type { Id } from "@codesandbox/pitcher-common"; import { Disposable } from "@codesandbox/pitcher-common"; import type { file } from "@codesandbox/pitcher-protocol"; import type { IFile, IDidSaveEvent, IDidContentChangeEvent, IWillClientJoinEvent, IDidClientJoinEvent, IWillClientLeaveEvent, IDidClientLeaveEvent, Clients } from "../../../interface/clients/IFile"; import type { RelativeWorkspacePath } from "../../../types"; import type { PitcherMessageHandler } from "../../PitcherMessageHandler"; import { Document } from "./Document"; export declare class File extends Disposable implements IFile { private messageHandler; private onDidSaveEmitter; onDidSave: import("@codesandbox/pitcher-common").Event; private onDidContentChangeEmitter; onDidContentChange: import("@codesandbox/pitcher-common").Event; private onWillClientJoinEmitter; onWillClientJoin: import("@codesandbox/pitcher-common").Event; private onDidClientJoinEmitter; onDidClientJoin: import("@codesandbox/pitcher-common").Event; private onWillClientLeaveEmitter; onWillClientLeave: import("@codesandbox/pitcher-common").Event; private onDidClientLeaveEmitter; onDidClientLeave: import("@codesandbox/pitcher-common").Event; private onDidMoveEmitter; onDidMove: import("@codesandbox/pitcher-common").Event; id: Id; content: string | Uint8Array; isBinary: boolean; clients: Clients; savedHash: string; contentHash: string; document: Document | null; path: RelativeWorkspacePath; get isDirty(): boolean; constructor(path: RelativeWorkspacePath, fileData: file.IFileObject, messageHandler: PitcherMessageHandler); updatePath(newPath: RelativeWorkspacePath): void; resync(): Promise; /** * Will get the current content of the document in Pitcher and reset the otClient to that state. * It returns the current contents which should be updated in the code editor */ resetFromServer(): Promise; /** * Will get the current content of the document in Pitcher, reset the otClient to that state and * apply the current editor contents as a diff operation on top */ resetFromClient(content: string): Promise; updateContent(newContent: string): void; save(write?: boolean): Promise; /** Do not call this directly, should be called by the wrapping Rc */ private internalClose; } //# sourceMappingURL=File.d.ts.map