import type { Id } from "@codesandbox/pitcher-common"; import { bedrockFS } from "@codesandbox/pitcher-common"; import type { fs as fsProcotol } from "@codesandbox/pitcher-protocol"; import type { RelativeWorkspacePath } from "../types"; export declare class MemoryFS { tree: bedrockFS.Tree; /** Map of outgoing operations that have not yet been confirmed by the server */ private pendingOperations; private revertOperations; private messageId; /** operations coming from the server */ private incomingOperations; private remoteClock; constructor(); populateTreeFromJSON(payload: fsProcotol.FSReadResult): void; /** Applies an operation and returns the inverse operation */ private applyOperation; /** Apply a client-side created operation, these get added to a queue and synced to pitcher */ applyPendingOperation(op: fsProcotol.FSOperation): number | false; /** * received an operation notification from the server * * This can be: * - Operation created by other client * - Confirmation for a pending operation this client created */ receiveNotification(evt: fsProcotol.FSOperationEvent): void; /** * sync the fs tree, dropping operations that have been processed by the server * @param pendingOpsToDrop the list of operations that have been processed by the server * @returns the amount of operations that have been applied */ syncFSTree(pendingOpsToDrop: number[]): number; getPathFromId(id: Id): RelativeWorkspacePath | undefined; getIdFromPath(path: string): Id | undefined; getNodeById(id: Id): bedrockFS.TreeNode | undefined; } //# sourceMappingURL=MemoryFS.d.ts.map