Skip to content

Commit dcfcac4

Browse files
grodierjacob-ebey
andauthored
Fix generated types to work with pure esm (#14)
Co-authored-by: Jacob Ebey <[email protected]>
1 parent f5a5e15 commit dcfcac4

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

.changeset/electro-disco.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@remix-run/web-fetch": patch
3+
---
4+
5+
Fix generated types to work with node ESM / NodeNext

packages/fetch/src/fetch.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ const supportedSchemas = new Set(['data:', 'http:', 'https:', 'file:']);
3232
/**
3333
* Fetch function
3434
*
35-
* @param {string | URL | import('./request').default} url - Absolute url or Request instance
35+
* @param {string | URL | import('./request.js').default} url - Absolute url or Request instance
3636
* @param {RequestInit} [options_] - Fetch options
37-
* @return {Promise<import('./response').default>}
37+
* @return {Promise<import('./response.js').default>}
3838
*/
3939
async function fetch(url, options_ = {}) {
4040
return new Promise((resolve, reject) => {
@@ -319,9 +319,9 @@ async function fetch(url, options_ = {}) {
319319
}
320320

321321
/**
322-
*
323-
* @param {import('http').ClientRequest} request
324-
* @param {(error:Error) => void} errorCallback
322+
*
323+
* @param {import('http').ClientRequest} request
324+
* @param {(error:Error) => void} errorCallback
325325
*/
326326
function fixResponseChunkedTransferBadEnding(request, errorCallback) {
327327
/** @type {import('net').Socket} */

0 commit comments

Comments
 (0)