UNPKG

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