Skip to content

update typescript-fetch for modern TS compat #10314

Description

@devin-fee-ah
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
  1. replace with cross-fetch
  2. remove declaration file

also ought to mention the last person who changed this... @jeff-99

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions