Skip to content

Commit

Permalink
better comments for type description
Browse files Browse the repository at this point in the history
  • Loading branch information
cenfun committed Jul 3, 2024
1 parent 786a363 commit 81021d0
Showing 1 changed file with 31 additions and 4 deletions.
35 changes: 31 additions & 4 deletions lib/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,18 @@ declare namespace MCR {

export type ReportDescription =
['v8'] | ["v8", {
/**
* defaults to `index.html`
*/
outputFile?: string;
inline?: boolean;
assetsPath?: string;
metrics?: Array<"bytes" | "statements" | "branches" | "functions" | "lines">;
}] |
['v8-json'] | ["v8-json", {
/**
* defaults to `coverage-report.json`
*/
outputFile?: string;
}] |
['clover'] | ['clover', {
Expand Down Expand Up @@ -105,9 +111,15 @@ declare namespace MCR {
file?: string;
}] |
['codecov'] | ["codecov", {
/**
* defaults to `codecov.json`
*/
outputFile?: string;
}] |
['codacy'] | ["codacy", {
/**
* defaults to `codacy.json`
*/
outputFile?: string;
}] |
['console-summary'] | ['console-summary', {
Expand All @@ -121,13 +133,19 @@ declare namespace MCR {
['markdown-summary'] | ['markdown-summary', {
color: 'unicode' | 'html' | 'tex' | string;
metrics?: Array<"bytes" | "statements" | "branches" | "functions" | "lines">;
/**
* defaults to `coverage-summary.md`
*/
outputFile?: string;
}] |
['markdown-details'] | ['markdown-details', {
baseUrl?: string;
color: 'unicode' | 'html' | 'tex' | string;
skipPercent?: number;
metrics?: Array<"bytes" | "statements" | "branches" | "functions" | "lines">;
/**
* defaults to `coverage-details.md`
*/
outputFile?: string;
}] |
['raw'] | ['raw', {
Expand Down Expand Up @@ -205,12 +223,21 @@ declare namespace MCR {
branches?: CoverageRange[];
functions?: CoverageRange[];
ignores?: IgnoredRange[];
lines: {
/** number: hits (0 means uncovered), string: partial covered */
lines?: {
/**
* key: line number;
* number: hits (0 means uncovered);
* string: partial covered
*/
[key: string]: number | string;
};
extras: {
/** b: blank, c: comment, i: ignored */
extras?: {
/**
* key: line number;
* b: blank;
* c: comment;
* i: ignored;
*/
[key: string]: "b" | "c" | "i";
}
}
Expand Down

0 comments on commit 81021d0

Please sign in to comment.