knip
Version:
Find unused files, dependencies and exports in your TypeScript and JavaScript projects
37 lines (36 loc) • 973 B
TypeScript
import type ts from 'typescript';
type SymbolTable = Map<string, SymbolWithExportSymbol>;
type SymbolWithExports = ts.Symbol & {
exports?: SymbolTable;
};
interface SymbolWithExportSymbol extends ts.Symbol {
exportSymbol?: ts.Symbol;
}
type PragmaMap = {
arguments: {
factory?: string;
path?: {
value?: string;
pos?: number;
};
types?: {
value?: string;
pos?: number;
};
};
range?: {
kind?: number;
pos?: number;
end?: number;
hasTrailingNewLine?: boolean;
};
};
export interface BoundSourceFile extends ts.SourceFile {
symbol?: SymbolWithExports;
resolvedModules?: ts.ModeAwareCache<ts.ResolvedModuleWithFailedLookupLocations>;
locals?: SymbolTable;
getNamedDeclarations?(): Map<string, readonly ts.Declaration[]>;
scriptKind?: ts.ScriptKind;
pragmas?: Map<string, PragmaMap | PragmaMap[]>;
}
export {};