UNPKG

knip

Version:

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

23 lines (22 loc) 956 B
import ts from 'typescript'; import type { AsyncCompilers, SyncCompilers } from '../compilers/types.js'; interface SourceFileManagerOptions { isSkipLibs: boolean; compilers: [SyncCompilers, AsyncCompilers]; } export declare class SourceFileManager { isSkipLibs: boolean; sourceFileCache: Map<string, ts.SourceFile | undefined>; snapshotCache: Map<string, ts.IScriptSnapshot | undefined>; scriptVersions: Map<string, number>; syncCompilers: SyncCompilers; asyncCompilers: AsyncCompilers; constructor({ compilers, isSkipLibs }: SourceFileManagerOptions); createSourceFile(filePath: string, contents: string): ts.SourceFile; getSourceFile(filePath: string): ts.SourceFile | undefined; getSnapshot(filePath: string): ts.IScriptSnapshot | undefined; getScriptVersion(filePath: string): number; invalidate(filePath: string): void; compileAndAddSourceFile(filePath: string): Promise<void>; } export {};