import type { Project, SourceFile } from '../utils/ts-morph.ts'; import { type Languages } from '../utils/get-language.ts'; interface AnalysisDocumentBase { value: string; language: Languages; filePath: string; label: string | undefined; valueSignature: string; isJavaScriptLikeLanguage: boolean; isGeneratedFileName: boolean; jsxOnly: boolean; shouldVirtualizeFilePath: boolean; } export type AnalysisDocument = (AnalysisDocumentBase & { kind: 'file'; }) | (AnalysisDocumentBase & { kind: 'snippet'; basePath?: string; contentHash: string; }); export type ResolvedAnalysisDocument = AnalysisDocument; export interface ResolveAnalysisDocumentOptions { value: string; filePath?: string; language?: Languages; baseDirectory?: string; tsConfigDirectory?: string; project?: Project; virtualizeFilePath?: boolean; } export declare const generatedFilenames: Set; export declare function getSourceTextValueSignature(value: string): string; export declare function coerceAnalysisDocumentSourceFileToModule(sourceFile: SourceFile): boolean; export declare function trimSyntheticAnalysisDocumentModuleExport(value: string, options?: { preserveTrailingNewline?: boolean; }): string; export declare function sourceFileTextMatchesAnalysisDocumentValue(sourceFileText: string, value: string): boolean; export declare function resolveVirtualizedAnalysisDocumentStableFilePath(project: Project | undefined, filePath: string): string; export declare function hydrateAnalysisDocumentSourceFile(project: Project, metadata: { value: string; language?: Languages; filePath?: string; }): void; export declare function getAnalysisDocumentStableFilePath(document: ResolvedAnalysisDocument): string; export declare function getOriginalAnalysisDocumentFilePathFromStableFilePath(filePath: string): string; export declare function resolveAnalysisDocument({ value, filePath: filePathProp, language: languageProp, baseDirectory, tsConfigDirectory, project, virtualizeFilePath, }: ResolveAnalysisDocumentOptions): ResolvedAnalysisDocument; export declare function updateAnalysisDocumentValue(document: ResolvedAnalysisDocument, value: string): ResolvedAnalysisDocument; export declare function toSourceTextMetadata(document: Pick): { value: string; language: Languages; filePath: string; label: string | undefined; valueSignature: string; }; export {};