forked from dependents/node-dependency-tree
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.d.ts
34 lines (29 loc) · 824 Bytes
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
declare namespace dependencyTree {
interface TreeInnerNode {
[parent: string]: TreeInnerNode | string;
}
type Tree = TreeInnerNode | string;
export interface Options {
filename: string;
directory: string;
visited?: Tree;
nonExistent?: string[];
isListForm?: boolean;
requireConfig?: string;
webpackConfig?: string;
nodeModulesConfig?: any;
detectiveConfig?: any;
tsConfig?: string | Record<string, any>;
noTypeDefinitions?: boolean;
filter?: (path: string) => boolean;
}
interface Config extends Options {
clone: () => Config;
}
function toList(options: Options): string[];
function _getDependencies(config: Config): string[];
}
declare function dependencyTree(
options: dependencyTree.Options
): dependencyTree.Tree;
export = dependencyTree;