UNPKG

966 BTypeScriptView Raw
1import { DepGraph } from '@snyk/dep-graph';
2export interface DepDict {
3 [name: string]: DepTree;
4}
5export interface DepTree {
6 name: string;
7 version?: string;
8 dependencies?: DepDict;
9 packageFormatVersion?: string;
10 _counts?: any;
11 _isProjSubpkg?: boolean;
12}
13interface Options {
14 debug?: boolean;
15 file?: string;
16}
17export declare function inspect(root: any, targetFile: any, options?: Options): Promise<{
18 plugin: {
19 name: string;
20 runtime: string | undefined;
21 targetFile: any;
22 };
23 dependencyGraph: DepGraph | undefined;
24 package?: undefined;
25} | {
26 plugin: {
27 name: string;
28 runtime: string | undefined;
29 targetFile: any;
30 };
31 package: DepTree | undefined;
32 dependencyGraph?: undefined;
33}>;
34export declare function buildDepGraphFromImportsAndModules(root?: string, targetFile?: string): Promise<DepGraph>;
35export declare function jsonParse(s: string): any;
36export {};