UNPKG

knip

Version:

Find unused files, dependencies and exports in your TypeScript and JavaScript projects

26 lines (25 loc) 1.21 kB
import type { WatchListener } from 'node:fs'; import type { ConfigurationChief } from '../ConfigurationChief.js'; import type { ConsoleStreamer } from '../ConsoleStreamer.js'; import type { IssueCollector } from '../IssueCollector.js'; import type { PrincipalFactory } from '../PrincipalFactory.js'; import type { ProjectPrincipal } from '../ProjectPrincipal.js'; import type { DependencyGraph } from '../types/dependency-graph.js'; import type { Report } from '../types/issues.js'; type Watch = { analyzedFiles: Set<string>; analyzeSourceFile: (filePath: string, principal: ProjectPrincipal) => void; chief: ConfigurationChief; collector: IssueCollector; collectUnusedExports: () => Promise<void>; cwd: string; factory: PrincipalFactory; graph: DependencyGraph; isDebug: boolean; isIgnored: (path: string) => boolean; report: Report; streamer: ConsoleStreamer; unreferencedFiles: Set<string>; }; export declare const getWatchHandler: ({ analyzedFiles, analyzeSourceFile, chief, collector, collectUnusedExports, cwd, factory, graph, isDebug, isIgnored, report, streamer, unreferencedFiles, }: Watch) => Promise<WatchListener<string | Buffer>>; export {};