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 | import { Node, ReportBase } from "istanbul-lib-report";
|
12 |
|
13 | export function create<T extends keyof ReportOptions>(name: T, options?: Partial<ReportOptions[T]>): ReportBase;
|
14 |
|
15 | export interface FileOptions {
|
16 | file: string;
|
17 | }
|
18 |
|
19 | export interface ProjectOptions {
|
20 | projectRoot: string;
|
21 | }
|
22 |
|
23 | export interface ReportOptions {
|
24 | clover: CloverOptions;
|
25 | cobertura: CoberturaOptions;
|
26 | "html-spa": HtmlSpaOptions;
|
27 | html: HtmlOptions;
|
28 | json: JsonOptions;
|
29 | "json-summary": JsonSummaryOptions;
|
30 | lcov: LcovOptions;
|
31 | lcovonly: LcovOnlyOptions;
|
32 | none: never;
|
33 | teamcity: TeamcityOptions;
|
34 | text: TextOptions;
|
35 | "text-lcov": TextLcovOptions;
|
36 | "text-summary": TextSummaryOptions;
|
37 | }
|
38 |
|
39 | export type ReportType = keyof ReportOptions;
|
40 |
|
41 | export interface CloverOptions extends FileOptions, ProjectOptions {}
|
42 |
|
43 | export interface CoberturaOptions extends FileOptions, ProjectOptions {}
|
44 |
|
45 | export interface HtmlSpaOptions extends HtmlOptions {
|
46 | metricsToShow: Array<"lines" | "branches" | "functions" | "statements">;
|
47 | }
|
48 | export interface HtmlOptions {
|
49 | verbose: boolean;
|
50 | skipEmpty: boolean;
|
51 | subdir: string;
|
52 | linkMapper: LinkMapper;
|
53 | }
|
54 |
|
55 | export type JsonOptions = FileOptions;
|
56 | export type JsonSummaryOptions = FileOptions;
|
57 |
|
58 | export interface LcovOptions extends FileOptions, ProjectOptions {}
|
59 | export interface LcovOnlyOptions extends FileOptions, ProjectOptions {}
|
60 |
|
61 | export interface TeamcityOptions extends FileOptions {
|
62 | blockName: string;
|
63 | }
|
64 |
|
65 | export interface TextOptions extends FileOptions {
|
66 | maxCols: number;
|
67 | skipEmpty: boolean;
|
68 | skipFull: boolean;
|
69 | }
|
70 | export type TextLcovOptions = ProjectOptions;
|
71 | export type TextSummaryOptions = FileOptions;
|
72 |
|
73 | export interface LinkMapper {
|
74 | getPath(node: string | Node): string;
|
75 | relativePath(source: string | Node, target: string | Node): string;
|
76 | assetPath(node: Node, name: string): string;
|
77 | }
|
78 |
|
79 | ````
|
80 |
|
81 | ### Additional Details
|
82 | * Last updated: Tue, 07 Nov 2023 03:09:37 GMT
|
83 | * Dependencies: [@types/istanbul-lib-report](https://npmjs.com/package/@types/istanbul-lib-report)
|
84 |
|
85 | # Credits
|
86 | These definitions were written by [Jason Cheatham](https://github.com/jason0x43), and [Elena Shcherbakova](https://github.com/not-a-doctor).
|
87 |
|
\ | No newline at end of file |