ember-fetch: Typescript definitions don't work
If you import fetch from 'fetch', typescript won’t resolve it.
If you import fetch from 'ember-fetch', typescript will resolve it, but you’ll have a runtime error.
When you import fetch, typescript looks in node_modules/fetch. It won’t scan the whole node_modules directory for anyone exporting a fetch module. You can work around this with an explicit path mapping in tsconfig.json, but it’s not conventional.
Maybe this package could export ember-fetch, and eventually deprecate fetch?
/cc @toranb @chriskrycho
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 18 (9 by maintainers)
Hopefully that whole mess will be cleared up in the first couple days of this coming week!