1 | import { Node, ReportBase } from "istanbul-lib-report";
|
2 |
|
3 | export function create<T extends keyof ReportOptions>(name: T, options?: Partial<ReportOptions[T]>): ReportBase;
|
4 |
|
5 | export interface FileOptions {
|
6 | file: string;
|
7 | }
|
8 |
|
9 | export interface ProjectOptions {
|
10 | projectRoot: string;
|
11 | }
|
12 |
|
13 | export interface ReportOptions {
|
14 | clover: CloverOptions;
|
15 | cobertura: CoberturaOptions;
|
16 | "html-spa": HtmlSpaOptions;
|
17 | html: HtmlOptions;
|
18 | json: JsonOptions;
|
19 | "json-summary": JsonSummaryOptions;
|
20 | lcov: LcovOptions;
|
21 | lcovonly: LcovOnlyOptions;
|
22 | none: never;
|
23 | teamcity: TeamcityOptions;
|
24 | text: TextOptions;
|
25 | "text-lcov": TextLcovOptions;
|
26 | "text-summary": TextSummaryOptions;
|
27 | }
|
28 |
|
29 | export type ReportType = keyof ReportOptions;
|
30 |
|
31 | export interface CloverOptions extends FileOptions, ProjectOptions {}
|
32 |
|
33 | export interface CoberturaOptions extends FileOptions, ProjectOptions {}
|
34 |
|
35 | export interface HtmlSpaOptions extends HtmlOptions {
|
36 | metricsToShow: Array<"lines" | "branches" | "functions" | "statements">;
|
37 | }
|
38 | export interface HtmlOptions {
|
39 | verbose: boolean;
|
40 | skipEmpty: boolean;
|
41 | subdir: string;
|
42 | linkMapper: LinkMapper;
|
43 | }
|
44 |
|
45 | export type JsonOptions = FileOptions;
|
46 | export type JsonSummaryOptions = FileOptions;
|
47 |
|
48 | export interface LcovOptions extends FileOptions, ProjectOptions {}
|
49 | export interface LcovOnlyOptions extends FileOptions, ProjectOptions {}
|
50 |
|
51 | export interface TeamcityOptions extends FileOptions {
|
52 | blockName: string;
|
53 | }
|
54 |
|
55 | export interface TextOptions extends FileOptions {
|
56 | maxCols: number;
|
57 | skipEmpty: boolean;
|
58 | skipFull: boolean;
|
59 | }
|
60 | export type TextLcovOptions = ProjectOptions;
|
61 | export type TextSummaryOptions = FileOptions;
|
62 |
|
63 | export interface LinkMapper {
|
64 | getPath(node: string | Node): string;
|
65 | relativePath(source: string | Node, target: string | Node): string;
|
66 | assetPath(node: Node, name: string): string;
|
67 | }
|