import { r as FileSystem } from "./file-system-PsI0bi2L.js";
import { VirtualTypeScriptEnvironment } from "@typescript/vfs";
import TypeScript from "typescript";

//#region src/typescript.d.ts
type CreateTypeCheckerOptions = {
  fileSystem: FileSystem;
};
/**
 * Creates a TypeScript language service for the provided filesystem. Compiler
 * options are read from a `tsconfig.json` file in the filesystem; if none is
 * present, TypeScript's default options are used.
 *
 * The returned `fileSystem` wraps the input filesystem and mirrors subsequent
 * writes and deletes into the virtual TypeScript environment, so callers
 * should keep using that wrapper after initialization if they want later
 * edits to be reflected in diagnostics and completions.
 *
 * @param options.fileSystem Project files to expose to the language service.
 * A `tsconfig.json` at the root of the filesystem is parsed for compiler
 * options.
 * @returns The wrapped filesystem and the underlying TypeScript language
 * service.
 */
declare function createTypescriptLanguageService(
  options: CreateTypeCheckerOptions
): Promise<{
  fileSystem: TypescriptFileSystem;
  languageService: TypeScript.LanguageService;
}>;
/**
 * A `FileSystem` wrapper that keeps a virtual TypeScript environment in sync
 * with filesystem mutations.
 */
declare class TypescriptFileSystem implements FileSystem {
  private innerFs;
  private typescriptEnv;
  constructor(innerFs: FileSystem, typescriptEnv: VirtualTypeScriptEnvironment);
  read(path: string): string | null;
  write(path: string, content: string): void;
  delete(path: string): void;
  list(prefix?: string): string[];
  flush(): Promise<void>;
}
//#endregion
export { createTypescriptLanguageService };
//# sourceMappingURL=typescript.d.ts.map
