UNPKG

1.38 kBTypeScriptView Raw
1declare namespace istanbul {
2 interface Istanbul {
3 new(options?: any): Istanbul;
4 Collector: Collector;
5 config: Config;
6 ContentWriter: ContentWriter;
7 FileWriter: FileWriter;
8 hook: Hook;
9 Instrumenter: Instrumenter;
10 Report: Report;
11 Reporter: Reporter;
12 Store: Store;
13 utils: ObjectUtils;
14 VERSION: string;
15 Writer: Writer;
16 }
17
18 interface Collector {
19 new(options?: any): Collector;
20 add(coverage: any, testName?: string): void;
21 getFinalCoverage(): any;
22 }
23
24 interface Config {
25 }
26
27 interface ContentWriter {
28 }
29
30 interface FileWriter {
31 }
32
33 interface Hook {
34 }
35
36 interface Instrumenter {
37 new(options?: any): Instrumenter;
38 instrumentSync(code: string, filename: string): string;
39 }
40
41 interface Report {
42 }
43
44 interface Configuration {
45 new(obj: any, overrides: any): Configuration;
46 }
47
48 interface Reporter {
49 new(cfg?: Configuration, dir?: string): Reporter;
50 add(fmt: string): void;
51 addAll(fmts: string[]): void;
52 write(collector: Collector, sync: boolean, callback: Function): void;
53 }
54
55 interface Store {
56 }
57
58 interface ObjectUtils {
59 }
60
61 interface Writer {
62 }
63}
64
65declare var istanbul: istanbul.Istanbul;
66
67export = istanbul;