Create TypeScript declarations from JSDoc (#45)

This commit is contained in:
Konstantin Vyatkin
2020-06-10 16:09:02 +02:00
committed by GitHub
parent 1ec92a63b2
commit a1fef8cd0b
4 changed files with 5 additions and 8 deletions
+1 -2
View File
@@ -62,5 +62,4 @@ typings/
# dotenv environment variables file
.env
# next.js build output
.next
index.d.ts
Vendored
-4
View File
@@ -1,4 +0,0 @@
/// <reference lib="dom"/>
/* global Blob */
export = Blob;
+1 -1
View File
@@ -129,7 +129,7 @@ class Blob {
*
* @param {number} [start]
* @param {number} [end]
* @param {string} [contentType]
* @param {string} [type]
*/
slice(start = 0, end = this.size, type = '') {
const {size} = this;
+3 -1
View File
@@ -11,7 +11,8 @@
"lint": "xo",
"test": "xo && ava",
"report": "nyc ava",
"coverage": "nyc --reporter json --reporter text ava && codecov -f coverage/coverage-final.json"
"coverage": "nyc --reporter json --reporter text ava && codecov -f coverage/coverage-final.json",
"prepublishOnly": "tsc --declaration --emitDeclarationOnly --allowJs index.js"
},
"repository": "https://github.com/node-fetch/fetch-blob.git",
"keywords": [
@@ -33,6 +34,7 @@
"get-stream": "^5.1.0",
"node-fetch": "^2.6.0",
"nyc": "^15.0.1",
"typescript": "^3.9.5",
"xo": "^0.32.0"
},
"xo": {