knip
Version:
Find and fix unused dependencies, exports and files in your TypeScript and JavaScript projects
14 lines (13 loc) • 510 B
TypeScript
import type { Identifier, ModuleGraph, Position } from '../../types/module-graph.js';
import { type Via } from '../walk-down.js';
export interface UsageLocation extends Position {
filePath: string;
identifier: string;
isEntry: boolean;
via: Via;
}
export interface UsageResult {
locations: UsageLocation[];
reExportingEntryFile: string | undefined;
}
export declare const getUsage: (graph: ModuleGraph, entryPaths: Set<string>, filePath: string, identifier: Identifier) => UsageResult;