1 | # Installation
|
2 | > `npm install --save @types/istanbul-reports`
|
3 |
|
4 | # Summary
|
5 | This package contains type definitions for istanbul-reports (https://github.com/istanbuljs/istanbuljs).
|
6 |
|
7 | # Details
|
8 | Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/istanbul-reports.
|
9 | ## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/istanbul-reports/index.d.ts)
|
10 | ````ts
|
11 | // Type definitions for istanbul-reports 3.0
|
12 | // Project: https://github.com/istanbuljs/istanbuljs, https://istanbul.js.org
|
13 | // Definitions by: Jason Cheatham <https://github.com/jason0x43>
|
14 | // Elena Shcherbakova <https://github.com/not-a-doctor>
|
15 | // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
16 | // TypeScript Version: 2.4
|
17 |
|
18 | import { Node, ReportBase } from 'istanbul-lib-report';
|
19 |
|
20 | export function create<T extends keyof ReportOptions>(name: T, options?: Partial<ReportOptions[T]>): ReportBase;
|
21 |
|
22 | export interface FileOptions {
|
23 | file: string;
|
24 | }
|
25 |
|
26 | export interface ProjectOptions {
|
27 | projectRoot: string;
|
28 | }
|
29 |
|
30 | export interface ReportOptions {
|
31 | clover: CloverOptions;
|
32 | cobertura: CoberturaOptions;
|
33 | 'html-spa': HtmlSpaOptions;
|
34 | html: HtmlOptions;
|
35 | json: JsonOptions;
|
36 | 'json-summary': JsonSummaryOptions;
|
37 | lcov: LcovOptions;
|
38 | lcovonly: LcovOnlyOptions;
|
39 | none: never;
|
40 | teamcity: TeamcityOptions;
|
41 | text: TextOptions;
|
42 | 'text-lcov': TextLcovOptions;
|
43 | 'text-summary': TextSummaryOptions;
|
44 | }
|
45 |
|
46 | export type ReportType = keyof ReportOptions;
|
47 |
|
48 | export interface CloverOptions extends FileOptions, ProjectOptions {}
|
49 |
|
50 | export interface CoberturaOptions extends FileOptions, ProjectOptions {}
|
51 |
|
52 | export interface HtmlSpaOptions extends HtmlOptions {
|
53 | metricsToShow: Array<'lines' | 'branches' | 'functions' | 'statements'>;
|
54 | }
|
55 | export interface HtmlOptions {
|
56 | verbose: boolean;
|
57 | skipEmpty: boolean;
|
58 | subdir: string;
|
59 | linkMapper: LinkMapper;
|
60 | }
|
61 |
|
62 | export type JsonOptions = FileOptions;
|
63 | export type JsonSummaryOptions = FileOptions;
|
64 |
|
65 | export interface LcovOptions extends FileOptions, ProjectOptions {}
|
66 | export interface LcovOnlyOptions extends FileOptions, ProjectOptions {}
|
67 |
|
68 | export interface TeamcityOptions extends FileOptions {
|
69 | blockName: string;
|
70 | }
|
71 |
|
72 | export interface TextOptions extends FileOptions {
|
73 | maxCols: number;
|
74 | skipEmpty: boolean;
|
75 | skipFull: boolean;
|
76 | }
|
77 | export type TextLcovOptions = ProjectOptions;
|
78 | export type TextSummaryOptions = FileOptions;
|
79 |
|
80 | export interface LinkMapper {
|
81 | getPath(node: string | Node): string;
|
82 | relativePath(source: string | Node, target: string | Node): string;
|
83 | assetPath(node: Node, name: string): string;
|
84 | }
|
85 |
|
86 | ````
|
87 |
|
88 | ### Additional Details
|
89 | * Last updated: Tue, 01 Jun 2021 21:02:19 GMT
|
90 | * Dependencies: [@types/istanbul-lib-report](https://npmjs.com/package/@types/istanbul-lib-report)
|
91 | * Global values: none
|
92 |
|
93 | # Credits
|
94 | These definitions were written by [Jason Cheatham](https://github.com/jason0x43), and [Elena Shcherbakova](https://github.com/not-a-doctor).
|
95 |
|
\ | No newline at end of file |