tsro
Version:
TypeScript Remove Orphaned (tsro) is a CLI utility and library for TypeScript projects that detects and removes files containing invalid imports — imports that refer to nonexistent entities or nonexistent modules.
6 lines (5 loc) • 579 B
TypeScript
import ts from "typescript";
import { DiagnosticInfo } from "../types/diagnostic.js";
export declare const validateNamedImports: (node: ts.ImportDeclaration, sourceFile: ts.SourceFile, importPath: string, exports: ts.Symbol[]) => DiagnosticInfo[];
export declare const validateDefaultImport: (node: ts.ImportDeclaration, sourceFile: ts.SourceFile, importPath: string, exports: ts.Symbol[]) => DiagnosticInfo[];
export declare const validateNamespaceImport: (node: ts.ImportDeclaration, sourceFile: ts.SourceFile, importPath: string, moduleSymbol: ts.Symbol) => DiagnosticInfo[];