-
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Attempt to provide custom type mappings for remap-istanbul
Attempt to provide custom type mappings for remap-istanbul, inspired by: SitePen/remap-istanbul#155 (comment)
- Loading branch information
Showing
2 changed files
with
43 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
declare module 'remap-istanbul' { | ||
namespace RemapIstanbul { | ||
export interface Options { | ||
fail?: boolean; | ||
check?: CheckOptions; | ||
reportOpts?: {}; | ||
reports?: {}; | ||
} | ||
|
||
export interface CheckOptions { | ||
global?: Thresholds; | ||
each?: EachThresholds; | ||
} | ||
|
||
export interface Thresholds { | ||
statements: Number; | ||
branches: Number; | ||
lines: Number; | ||
functions: Number; | ||
excludes: string[]; | ||
} | ||
|
||
export interface EachThresholds extends Thresholds { | ||
overrides?: {}; | ||
} | ||
} | ||
|
||
export default class { | ||
/** | ||
* The basic API for utilising remap-istanbul | ||
* @param {Array|string} sources The sources that could be consumed and remapped. | ||
* For muliple sources to be combined together, provide | ||
* an array of strings. | ||
* @param {Object} reports An object where each key is the report type required and the value | ||
* is the destination for the report. | ||
* @param {Object} reportOptions? An object containing the report options. | ||
* @return {Promise} A promise that will resolve when all the reports are written. | ||
*/ | ||
public remap(sources: [], reports: object, reportOptions: RemapIstanbul.Options): any; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters