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

chore: Improve DOM-less type exports #352

Merged
merged 1 commit into from
Jun 3, 2024
Merged

Conversation

mdmower-csnw
Copy link
Contributor

Usage of HeadersInit requires either a node-fetch dependency or to include DOM in tsconfig libs for consumer projects. It is not exported as a global type in @types/node v18 or v20. RequestInit is:

https://github.com/DefinitelyTyped/DefinitelyTyped/blob/aaf94a0a6431f52c46dab26182f1156d79720d29/types/node/v18/globals.d.ts#L341

Define headers in interface HTTPResolverOptions<> via RequestInit['headers'] which will make it possible to depend on this project without node-fetch.

Usage of HeadersInit requires either a node-fetch dependency or to
include DOM in tsconfig libs for consumer projects. It is not exported
as a global type in @types/node v18 or v20. RequestInit is:

https://github.com/DefinitelyTyped/DefinitelyTyped/blob/aaf94a0a6431f52c46dab26182f1156d79720d29/types/node/v18/globals.d.ts#L341

Define headers in interface HTTPResolverOptions<> via
RequestInit['headers'] which will make it possible to depend on this
project without node-fetch.
@jonluca jonluca self-requested a review June 3, 2024 16:53
@jonluca jonluca merged commit 7916f8d into APIDevTools:main Jun 3, 2024
13 checks passed
@coveralls
Copy link

Pull Request Test Coverage Report for Build 9352827824

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.09%) to 95.46%

Totals Coverage Status
Change from base Build 9335131703: -0.09%
Covered Lines: 3441
Relevant Lines: 3549

💛 - Coveralls

Copy link

github-actions bot commented Jun 3, 2024

🎉 This PR is included in version 11.6.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants