Description
#6894 undid the inclusion of isomorphic-fetch and replaced it with portable-fetch (a fork of isomorphic-fetch, but without TypeScript types and with an incremental 3 line commit 3 years ago to support react native via fetch-npm-react-native.js.
Problem is, these declaration files simply don't work on modern typescript.
A better solution is to move to a maintained form of isomorphic-fetch which today is cross-fetch – which also (fortunately) includes types (and gets rid of the declaration file).
Swagger-codegen version
3.0.20
Command line used for generation
java -jar swagger-codegen-cli generate -l typescript-fetch -i foo.json
Related issues/PRs
#6894
Suggest a fix/enhancement
- replace with
cross-fetch
- remove declaration file
also ought to mention the last person who changed this... @jeff-99
Description
#6894 undid the inclusion of
isomorphic-fetchand replaced it withportable-fetch(a fork ofisomorphic-fetch, but without TypeScript types and with an incremental 3 line commit 3 years ago to support react native viafetch-npm-react-native.js.Problem is, these declaration files simply don't work on modern typescript.
A better solution is to move to a maintained form of
isomorphic-fetchwhich today iscross-fetch– which also (fortunately) includes types (and gets rid of the declaration file).Swagger-codegen version
3.0.20
Command line used for generation
java -jar swagger-codegen-cli generate -l typescript-fetch -i foo.jsonRelated issues/PRs
#6894
Suggest a fix/enhancement
cross-fetchalso ought to mention the last person who changed this... @jeff-99