developit / developit/unfetch

Typescript issue: weird dependency on node-fetch in declaration file

オープン
#96 コメント 9 件 リアクション 4 件 担当者 0 名 GitHub で見る
typescript
主要言語
JavaScript
スター
5.7k
フォーク
204
PR マージ指標
30日以内にマージされた PR はありません

説明

First of all thanks for awesome polyfill @developit. It's brilliant and altogether with preact it makes a perfect match for our product bundle!

As for this issue I'm not sure why there's a dependency on node-fetch in declaration file. When I try to use unfetch in my TS code I get this:

```
ERROR in [at-loader] ./node_modules/unfetch/src/index.d.ts:6:8
TS7016: Could not find a declaration file for module 'node-fetch'. '/Users/dsorin/.../node_modules/node-fetch/index.js' implicitly has an 'any' type.
Try `npm install @types/node-fetch` if it exists or add a new declaration (.d.ts) file containing `declare module 'node-fetch';`
```

I know this can be fixed by installing typings for node-fetch but this leads to a further questions like "what's this typing doing in our dependencies if we don't use node-fetch package? let's remove it".

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。