ember-cli / ember-fetch

HTML5 fetch polyfill from github wrapped and bundled for ember-cli users.
MIT License
176 stars 82 forks source link

ember-fetch `input` type parameter is incorrect #716

Closed hmajoros closed 2 years ago

hmajoros commented 2 years ago

the generic fetch method's input parameter is typed as URL | RequestInfo, but ember-fetch only types it as RequestInfo. This causes issues when passing fetch as a function parameter in typescript, because ember-fetch is not assignable to regular ol' fetch.

see this TS playground for example: playground link

fix should be easy, just modify the types in index.d.ts, happy to make the PR