knip
Version:
Find and fix unused dependencies, exports and files in your TypeScript and JavaScript projects
30 lines (29 loc) • 1.76 kB
TypeScript
import { ISSUE_TYPE_TITLE } from '../../constants.ts';
import type { Issue, IssueRecords, IssueSeverity, IssueSymbol, IssueType } from '../../types/issues.ts';
import { Table } from '../../util/table.ts';
export declare const dim: import("picocolors/types.js").Formatter;
export declare const bright: import("picocolors/types.js").Formatter;
export declare const getIssueTypeTitle: (reportType: keyof typeof ISSUE_TYPE_TITLE) => "Unused files" | "Unused dependencies" | "Unused devDependencies" | "Referenced optional peerDependencies" | "Unlisted dependencies" | "Unlisted binaries" | "Unresolved imports" | "Unused exports" | "Exports in used namespace" | "Unused exported types" | "Exported types in used namespace" | "Unused exported enum members" | "Unused exported namespace members" | "Duplicate exports" | "Unused catalog entries";
export declare const getColoredTitle: (title: string, count: number) => string;
export declare const getDimmedTitle: (title: string, count: number) => string;
type LogIssueLine = {
owner?: string;
filePath: string;
symbols?: IssueSymbol[];
parentSymbol?: string;
severity?: IssueSeverity;
};
export declare const getIssueLine: ({ owner, filePath, symbols, parentSymbol, severity }: LogIssueLine, cwd: string) => string;
export declare const convert: (issue: Issue | IssueSymbol) => {
namespace: string | undefined;
name: string;
line: number | undefined;
col: number | undefined;
pos: number | undefined;
};
export declare const getTableForType: (issues: Issue[], cwd: string, options?: {
isUseColors?: boolean;
}) => Table;
export declare const flattenIssues: (issues: IssueRecords) => Issue[];
export declare const getIssuePrefix: (type: IssueType) => string;
export {};