Skip to content

Commit a1fef8c

Browse files
authored
Create TypeScript declarations from JSDoc (#45)
1 parent 1ec92a6 commit a1fef8c

File tree

4 files changed

+5
-8
lines changed

4 files changed

+5
-8
lines changed

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,5 +62,4 @@ typings/
6262
# dotenv environment variables file
6363
.env
6464

65-
# next.js build output
66-
.next
65+
index.d.ts

index.d.ts

Lines changed: 0 additions & 4 deletions
This file was deleted.

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ class Blob {
129129
*
130130
* @param {number} [start]
131131
* @param {number} [end]
132-
* @param {string} [contentType]
132+
* @param {string} [type]
133133
*/
134134
slice(start = 0, end = this.size, type = '') {
135135
const {size} = this;

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
"lint": "xo",
1212
"test": "xo && ava",
1313
"report": "nyc ava",
14-
"coverage": "nyc --reporter json --reporter text ava && codecov -f coverage/coverage-final.json"
14+
"coverage": "nyc --reporter json --reporter text ava && codecov -f coverage/coverage-final.json",
15+
"prepublishOnly": "tsc --declaration --emitDeclarationOnly --allowJs index.js"
1516
},
1617
"repository": "https://github.com/node-fetch/fetch-blob.git",
1718
"keywords": [
@@ -33,6 +34,7 @@
3334
"get-stream": "^5.1.0",
3435
"node-fetch": "^2.6.0",
3536
"nyc": "^15.0.1",
37+
"typescript": "^3.9.5",
3638
"xo": "^0.32.0"
3739
},
3840
"xo": {

0 commit comments

Comments
 (0)