Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add fetch types shim? #369

Open
dsherret opened this issue Feb 4, 2024 · 0 comments
Open

Add fetch types shim? #369

dsherret opened this issue Feb 4, 2024 · 0 comments

Comments

@dsherret
Copy link
Member

dsherret commented Feb 4, 2024

Nowadays, undici isn't necessary to use for Node, but still some global types error in Node when using fetch. There should probably be a built-in undici-types shim (this is what @types/node uses):

{
      package: {
        name: "undici-types",
      },
      globalNames: [{
        name: "BodyInit",
        typeOnly: true,
      }, {
        name: "RequestCache",
        typeOnly: true,
      }, {
        name: "RequestMode",
        typeOnly: true,
      }, {
        name: "RequestRedirect",
        typeOnly: true,
      }, {
        name: "ReferrerPolicy",
        typeOnly: true,
      }],
    }

Deps:

dependencies: {
      "undici-types": "^5.26",
    },
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant