Skip to content
Prev Previous commit
Next Next commit
create typings from JSDoc
  • Loading branch information
tinovyatkin committed Jun 8, 2020
commit a9109830298272b2ab285de3a3cf8d678c5e2283
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": "npx typescript --declaration --emitDeclarationOnly --allowJs index.js"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will use the globally installed version if there is one, or download the latest version. I think it would be better if we could pin a version by adding typescript to our devDependencies, and then referring to that one here:

Suggested change
"prepublishOnly": "npx typescript --declaration --emitDeclarationOnly --allowJs index.js"
"prepublishOnly": "tsc --declaration --emitDeclarationOnly --allowJs index.js"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can pin TypeScript version at npx: npx typescript@latest ... if a lower version on a published system is the concern? We need it only before publishing, so, not sure if it better to include and maintain TypeScript as a dependency...

},
"repository": "https://github.com/node-fetch/fetch-blob.git",
"keywords": [
Expand Down