Skip to content

Commit

Permalink
fix(fetch): fix ESM types (#75)
Browse files Browse the repository at this point in the history
* Fix generated types to work with pure esm

Co-authored-by: Jacob Ebey <[email protected]>

* chore: fix changeset

---------

Co-authored-by: George Rodier <[email protected]>
Co-authored-by: Jacob Ebey <[email protected]>
Co-authored-by: Irakli Gozalishvili <[email protected]>
  • Loading branch information
4 people authored Aug 28, 2023
1 parent 5453f55 commit c97e2b8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/electro-disco.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@web-std/fetch": patch
---

Fix generated types to work with node ESM / NodeNext
4 changes: 2 additions & 2 deletions packages/fetch/src/fetch.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ const supportedSchemas = new Set(['data:', 'http:', 'https:', 'file:']);
/**
* Fetch function
*
* @param {string | URL | import('./request').default} url - Absolute url or Request instance
* @param {string | URL | import('./request.js').default} url - Absolute url or Request instance
* @param {RequestInit & import('./request.js').RequestExtraOptions} [options_] - Fetch options
* @return {Promise<import('./response').default>}
* @return {Promise<import('./response.js').default>}
*/
async function fetch(url, options_ = {}) {
return new Promise((resolve, reject) => {
Expand Down

0 comments on commit c97e2b8

Please sign in to comment.