import { ProjectOptions } from "./project-options"; export declare class ParserEngine { dryRun?: boolean; projectPath: string; nrFilesProcessed: number; nrPathsProcessed: number; errors: string[]; srcRoot: string; basePath: string; distRoot: string; compactMode: boolean; projectOptions: ProjectOptions; tsConfig: any; fileFilter: Array; constructor(dryRun?: boolean); exit(code?: number): void; /** * Assign project path * @param {string} projectPath * @returns {boolean} */ setProjectPath(projectPath: string): boolean; /** * Set the accepted file extensions, ensure leading . (dot) * @param {Array} filter */ setFileFilter(filter: Array): void; private validateProjectPath; /** * Attempts to read the name property form package.json * @returns {string} */ private readProjectName; /** * Parse project and resolve paths */ execute(): Promise; private shouldSkipFile; /** * * @param sourceFilename * @param jsRequire - require in javascript source "require("jsRequire") * @returns {string} */ getRelativePathForRequiredFile(sourceFilename: string, jsRequire: string): string; /** * Processes the filename specified in require("filename") * @param node * @param sourceFilename * @returns {any} */ processJsRequire(node: any, sourceFilename: string): any; /** * Extracts all the requires from a single file and processes the paths * @param filename */ processFile(filename: string): void; /** * Saves file contents to disk * @param filename * @param fileContents */ saveFileContents(filename: string, fileContents: string): boolean; /** * Read and parse the TypeScript configuration file * @param configFilename */ readConfig(configFilename?: string): ProjectOptions; /** * Traverse parsed JavaScript * @param ast * @param scope * @param func */ private traverseSynTree; /** * Match a given file extension with the configured extensions * @param {string} fileExtension - ".xxx" or "xxx * @returns {boolean} */ private matchExtension; /** * Recursively walking a directory structure and collect files * @param dir * @param filelist * @param fileExtension * @returns {Array} */ walkSync(dir: string, filelist: Array, fileExtension?: string): string[]; }