knip
Version:
Find unused files, dependencies and exports in your TypeScript and JavaScript projects
33 lines (32 loc) • 2.57 kB
TypeScript
import ts from 'typescript';
export declare function isGetOrSetAccessorDeclaration(node: ts.Node): node is ts.AccessorDeclaration;
export declare function isPrivateMember(node: ts.MethodDeclaration | ts.PropertyDeclaration | ts.SetAccessorDeclaration | ts.GetAccessorDeclaration): boolean;
export declare function isDefaultImport(node: ts.ImportDeclaration | ts.ImportEqualsDeclaration | ts.ExportDeclaration): boolean;
export declare function isAccessExpression(node: ts.Node): node is ts.AccessExpression;
export declare function isImportCall(node: ts.Node): node is ts.ImportCall;
export declare function isRequireCall(callExpression: ts.Node): callExpression is ts.CallExpression;
export declare function isPropertyAccessCall(node: ts.Node, identifier: string): node is ts.CallExpression;
export declare function stripQuotes(name: string): string;
export declare function findAncestor<T>(node: ts.Node | undefined, callback: (element: ts.Node) => boolean | 'STOP'): T | undefined;
export declare function findDescendants<T>(node: ts.Node | undefined, callback: (element: ts.Node) => boolean | 'STOP'): T[];
export declare const isDeclarationFileExtension: (extension: string) => extension is ".d.ts" | ".d.mts" | ".d.cts";
export declare const getJSDocTags: (node: ts.Node) => Set<string>;
export declare const getLineAndCharacterOfPosition: (node: ts.Node, pos: number) => {
line: number;
col: number;
pos: number;
};
export declare const getAccessMembers: (typeChecker: ts.TypeChecker, node: ts.Identifier) => string[];
export declare const isDestructuring: (node: ts.Node) => boolean;
export declare const getDestructuredIds: (name: ts.ObjectBindingPattern) => string[];
export declare const isConsiderReferencedNS: (node: ts.Identifier) => boolean;
export declare const isObjectEnumerationCallExpressionArgument: (node: ts.Identifier) => boolean;
export declare const isInForIteration: (node: ts.Node) => boolean;
export declare const isTopLevel: (node: ts.Node) => boolean;
export declare const getTypeName: (node: ts.Identifier) => ts.QualifiedName | undefined;
export declare const isImportSpecifier: (node: ts.Node) => boolean;
export declare const isReferencedInExport: (node: ts.Node) => boolean;
export declare const getExportKeywordNode: (node: ts.Node) => ts.ExportKeyword | undefined;
export declare const getDefaultKeywordNode: (node: ts.Node) => ts.DefaultKeyword | undefined;
export declare const hasRequireCall: (node: ts.Node) => boolean;
export declare const isModuleExportsAccess: (node: ts.PropertyAccessExpression) => boolean;