import type { AnalysisOptions } from '../analysis/types.ts'; import { BaseFileSystem, type FileReadableStream, type FileSystemWriteFileContent, type FileWritableStream, type AsyncFileSystem, type SyncFileSystem, type WritableFileSystem } from './FileSystem.ts'; import type { DirectoryEntry } from './types.ts'; export interface InMemoryFileTextEntry { kind: 'Text'; content: string; } export interface InMemoryFileBinaryEntry { kind: 'Binary'; content: Uint8Array | string; encoding?: 'binary' | 'base64'; } export type InMemoryFileEntry = InMemoryFileTextEntry | InMemoryFileBinaryEntry; export interface InMemoryDirectoryEntry { kind: 'Directory'; } export type InMemoryEntry = InMemoryFileEntry | InMemoryDirectoryEntry; export type InMemoryFileContent = string | Uint8Array | ArrayBuffer | ArrayBufferView | InMemoryFileEntry; /** A file system that stores files in memory. */ export declare class InMemoryFileSystem extends BaseFileSystem implements AsyncFileSystem, SyncFileSystem, WritableFileSystem { #private; constructor(files: { [path: string]: InMemoryFileContent; }); usesPersistentCacheByDefault(): boolean; usesDirectoryMtimeSnapshotDependencies(): boolean; validatesPersistedFileDependenciesByDefault(): boolean; getFileExports(filePath: string): Promise; createFile(path: string, content: InMemoryFileContent): void; getAnalysisCacheMetadata(): AnalysisOptions; getCacheIdentity(): unknown; transpileFile(path: string): Promise; getAbsolutePath(path: string): string; getRelativePathToWorkspace(path: string): string; getFiles(): Map; getFileEntry(path: string): InMemoryEntry | undefined; readDirectorySync(path?: string): DirectoryEntry[]; readDirectory(path?: string): Promise; readFileSync(path: string): string; readFile(path: string): Promise; readFileBinarySync(path: string): Uint8Array; readFileBinary(path: string): Promise; readFileStream(path: string): FileReadableStream; getFileByteLengthSync(path: string): number | undefined; getFileByteLength(path: string): Promise; writeFileSync(path: string, content: FileSystemWriteFileContent): void; writeFile(path: string, content: FileSystemWriteFileContent): Promise; writeFileStream(path: string): FileWritableStream; fileExistsSync(path: string): boolean; fileExists(path: string): Promise; deleteFileSync(path: string): void; deleteFile(path: string): Promise; createDirectory(path: string): Promise; rename(source: string, target: string, options?: { overwrite?: boolean; }): Promise; copy(source: string, target: string, options?: { overwrite?: boolean; }): Promise; isFilePathGitIgnored(filePath: string): boolean; getFileLastModifiedMsSync(_path: string): number | undefined; getFileLastModifiedMs(path: string): Promise; }