UNPKG

knip

Version:

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

40 lines (39 loc) 1.82 kB
import type { PluginName } from '../types/PluginNames.js'; type InputType = 'binary' | 'entry' | 'config' | 'dependency' | 'deferResolve' | 'deferResolveEntry'; export interface Input { type: InputType; specifier: string; production?: boolean; optional?: boolean; dir?: string; containingFilePath?: string; } export interface ConfigInput extends Input { type: 'config'; containingFilePath: string; pluginName: PluginName; } type Options = { production?: boolean; optional?: boolean; dir?: string; containingFilePath?: string; }; export declare const fromBinary: (input: Input) => string; export declare const toBinary: (specifier: string, options?: Options) => Input; export declare const isBinary: (input: Input) => boolean; export declare const toEntry: (specifier: string) => Input; export declare const isEntry: (input: Input) => boolean; export declare const toProductionEntry: (specifier: string, options?: Options) => Input; export declare const isProductionEntry: (input: Input) => boolean; export declare const toConfig: (pluginName: PluginName, specifier: string, containingFilePath: string) => ConfigInput; export declare const isConfigPattern: (input: Input) => input is ConfigInput; export declare const toDependency: (specifier: string, options?: Options) => Input; export declare const isDependency: (input: Input) => boolean; export declare const toProductionDependency: (specifier: string) => Input; export declare const toDevDependency: (specifier: string) => Input; export declare const toDeferResolve: (specifier: string) => Input; export declare const toDeferResolveEntry: (specifier: string) => Input; export declare const isDeferResolveEntry: (input: Input) => boolean; export declare const toDebugString: (input: Input) => string; export {};