import type { ParseResult } from 'oxc-parser'; import { CacheConsultant } from './CacheConsultant.ts'; import type { Compilers } from './compilers/types.ts'; import type { GetImportsAndExportsOptions, IgnoreExportsUsedInFile, PluginVisitorContext, PluginVisitorObject } from './types/config.ts'; import type { FileNode, ModuleGraph } from './types/module-graph.ts'; import type { Paths } from './types/project.ts'; import type { ResolveGlobPattern } from './typescript/resolve-module-names.ts'; import { SourceFileManager } from './typescript/SourceFileManager.ts'; import type { MainOptions } from './util/create-options.ts'; import type { ToSourceFilePath, WorkspacePackageTargetHandler } from './util/to-source-path.ts'; export declare class ProjectPrincipal { entryPaths: Set; projectPaths: Set; programPaths: Set; skipExportsAnalysis: Set; private includeExportsAnalysis; pluginCtx: PluginVisitorContext; pluginVisitorObjects: PluginVisitorObject[]; private _visitor; private _localRefsVisitor; compilers: Compilers; private scopedCompilers; private paths; private rootDirs; private tsConfigFile; private extensions; cache: CacheConsultant; toSourceFilePath: ToSourceFilePath; private findWorkspacePackageTarget; private findWorkspaceNameByFilePath; private isReportExports; fileManager: SourceFileManager; private resolveModule; resolveGlobPattern: ResolveGlobPattern; resolvedFiles: Set; deletedFiles: Set; private onPathAdded; constructor(options: MainOptions, toSourceFilePath: ToSourceFilePath, findWorkspacePackageTarget: WorkspacePackageTargetHandler | undefined, findWorkspaceNameByFilePath: (filePath: string) => string | undefined); addCompilers(workspaceName: string, compilers: Compilers): void; addPaths(paths: Paths, basePath: string, scope: string): void; addRootDirs(rootDirs: string[] | undefined, scope: string): void; init(): void; private hasAcceptedExtension; addEntryPath(filePath: string, options?: { skipExportsAnalysis: boolean; }): void; addEntryPaths(filePaths: Set | string[], options?: { skipExportsAnalysis: boolean; }): void; addProgramPath(filePath: string): void; addProjectPath(filePath: string): void; removeProjectPath(filePath: string): void; walkAndAnalyze(analyzeFile: (filePath: string, parseResult: ParseResult | undefined, sourceText: string, cachedFile?: FileNode) => Iterable | undefined): Promise; getUsedResolvedFiles(): Promise>; private resolveSpecifier; getUnreferencedFiles(): string[]; private getCachedFile; analyzeSourceFile(filePath: string, sourceText: string, options: GetImportsAndExportsOptions, ignoreExportsUsedInFile: IgnoreExportsUsedInFile, parseResult?: ParseResult, cachedFile?: FileNode): FileNode; invalidateFile(filePath: string): void; reconcileCache(graph: ModuleGraph): void; }