diff --git a/.gitignore b/.gitignore index 2d318e6..8602d1e 100644 --- a/.gitignore +++ b/.gitignore @@ -62,5 +62,4 @@ typings/ # dotenv environment variables file .env -# next.js build output -.next +index.d.ts diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index 841e665..0000000 --- a/index.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -/// - -/* global Blob */ -export = Blob; diff --git a/index.js b/index.js index 5ad1e05..e163717 100644 --- a/index.js +++ b/index.js @@ -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; diff --git a/package.json b/package.json index f303742..07d4b15 100644 --- a/package.json +++ b/package.json @@ -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": {