mp-lens
Version:
微信小程序分析工具 (Unused Code, Dependencies, Visualization)
23 lines (22 loc) • 1.08 kB
TypeScript
/**
* Checks if a .d.ts file is a pure ambient declaration file.
* Pure ambient declaration files add types to the global scope without using
* import/export statements, making them automatically available without explicit imports.
*
* @param filePath The absolute path to the .d.ts file
* @returns true if the file is a pure ambient declaration file, false otherwise
*/
export declare function isPureAmbientDeclarationFile(filePath: string): boolean;
/**
* Checks if a file is a TypeScript declaration file (.d.ts)
*/
export declare function isDeclarationFile(filePath: string): boolean;
/**
* Finds all .d.ts files in a project that are pure ambient declaration files.
* These files should not be marked as unused even if they're not explicitly imported.
*
* @param projectRoot The absolute path to the project root
* @param allFiles An array of all files found in the project
* @returns An array of absolute paths to pure ambient declaration files
*/
export declare function findPureAmbientDeclarationFiles(projectRoot: string, allFiles: string[]): string[];