Skip to content

Commit

Permalink
feat: add TS typings (#35)
Browse files Browse the repository at this point in the history
  • Loading branch information
SimenB authored and bcoe committed Jun 23, 2019
1 parent 509c230 commit 5251108
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
14 changes: 14 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/// <reference types="node" />

import { Profiler } from 'inspector'
import { CoverageMapData } from 'istanbul-lib-coverage'

declare class V8ToIstanbul {
load(): Promise<void>
applyCoverage(blocks: ReadonlyArray<Profiler.FunctionCoverage>): void
toIstanbul(): CoverageMapData
}

declare function v8ToIstanbul(scriptPath: string, wrapperLength?: number): V8ToIstanbul

export = v8ToIstanbul
11 changes: 11 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "3.1.3",
"description": "convert from v8 coverage format to istanbul's format",
"main": "index.js",
"types": "index.d.ts",
"scripts": {
"snapshot": "TAP_SNAPSHOT=1 tap test/*.js",
"test": "c8 --reporter=html --reporter=text tap --no-coverage --no-esm test/*.js",
Expand All @@ -26,10 +27,12 @@
"author": "Ben Coe <ben@npmjs.com>",
"license": "ISC",
"dependencies": {
"@types/istanbul-lib-coverage": "^2.0.1",
"convert-source-map": "^1.6.0",
"source-map": "^0.7.3"
},
"devDependencies": {
"@types/node": "^12.0.10",
"c8": "^5.0.1",
"coveralls": "^3.0.4",
"should": "^13.2.3",
Expand Down

0 comments on commit 5251108

Please sign in to comment.