import { UnassignedFileInfo } from './unassigned-file-info'; import * as ts from 'typescript'; import { TsData } from './ts-data'; import { FsPath } from './fs-path'; export type ResolveFn = (moduleName: string) => ReturnType; /** * This function generates the FileInfo tree. * It starts with the entry TypeScript file and traverse all its imports. * * It does not follow an import when it is an external library, i.e. comes from * node_modules. The same is true, if a file is already traversed. * * To improve the testability, we use abstraction whenever access to the * filesystem happens. In case the abstraction does not emulate the original's * behaviour, "strange bugs" might occur. Look out for them. * * fixPathSeparators is necessary to replace the static '/' path separator * with the one from the OS. * * @param fsPath Filename to traverse from * @param fileInfoDict Dictionary of traversed files to catch circularity * @param tsData * @param ignoreFileExtensions Array of file extensions to ignore * @param runOnce traverse only once. needed for ESLint mode * @param fileContent if passed, is used instead the content of @fsPath. * necessary for unsaved files inESLint */ export declare function traverseFilesystem(fsPath: FsPath, fileInfoDict: Map, tsData: TsData, ignoreFileExtensions: string[], runOnce?: boolean, fileContent?: string): UnassignedFileInfo;