-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathindex.d.ts
More file actions
38 lines (34 loc) · 909 Bytes
/
index.d.ts
File metadata and controls
38 lines (34 loc) · 909 Bytes
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
35
36
37
38
import { Plugin } from "rollup";
declare const analyzer: (options?: AnalyzerOptions) => Plugin;
export default analyzer;
export interface Module {
id: string;
size: number;
origSize: number;
dependents: string[];
percent: number;
reduction: number;
usedExports: string[];
unusedExports: string[];
}
export interface AnalyzerOptions {
stdout?: boolean;
limit?: number;
filter?: string | string[] | ((moduleObject: Module) => boolean);
filterSummary?: boolean;
root?: string;
hideDeps?: boolean;
showExports?: boolean;
summaryOnly?: boolean;
skipFormatted?: boolean;
writeTo?: (analysisString: string) => void;
transformModuleId?: (id: string) => string;
onAnalysis?: (analysisObject: AnalysisObject) => void;
}
export interface AnalysisObject {
bundleSize: number;
bundleOrigSize: number;
bundleReduction: number;
moduleCount: number;
modules: Module[];
}