diff --git a/src/js/node/assert.js b/src/js/node/assert.ts similarity index 99% rename from src/js/node/assert.js rename to src/js/node/assert.ts index 33f58a9e50d28c..f2445c83da7bb9 100644 --- a/src/js/node/assert.js +++ b/src/js/node/assert.ts @@ -2,7 +2,7 @@ const util = require("node:util"); var isDeepEqual = Bun.deepEquals; -var __commonJS = (cb, mod) => +var __commonJS = (cb, mod: typeof module | undefined = undefined) => function () { return mod || (0, cb[Object.keys(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; }; diff --git a/src/js/node/child_process.js b/src/js/node/child_process.ts similarity index 100% rename from src/js/node/child_process.js rename to src/js/node/child_process.ts diff --git a/src/js/node/crypto.js b/src/js/node/crypto.ts similarity index 99% rename from src/js/node/crypto.js rename to src/js/node/crypto.ts index 2009b0a4ae06dc..83e0355a2599a8 100644 --- a/src/js/node/crypto.js +++ b/src/js/node/crypto.ts @@ -78,7 +78,7 @@ function getArrayBufferOrView(buffer, name, encoding) { const crypto = globalThis.crypto; const globalCrypto = crypto; -var __commonJS = (cb, mod) => +var __commonJS = (cb, mod: typeof module | undefined = undefined) => function () { return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; }; diff --git a/src/js/node/diagnostics_channel.js b/src/js/node/diagnostics_channel.ts similarity index 100% rename from src/js/node/diagnostics_channel.js rename to src/js/node/diagnostics_channel.ts diff --git a/src/js/node/dns.js b/src/js/node/dns.ts similarity index 100% rename from src/js/node/dns.js rename to src/js/node/dns.ts diff --git a/src/js/node/events.js b/src/js/node/events.ts similarity index 100% rename from src/js/node/events.js rename to src/js/node/events.ts diff --git a/src/js/node/fs.js b/src/js/node/fs.ts similarity index 100% rename from src/js/node/fs.js rename to src/js/node/fs.ts diff --git a/src/js/node/net.js b/src/js/node/net.ts similarity index 100% rename from src/js/node/net.js rename to src/js/node/net.ts diff --git a/src/js/node/punycode.js b/src/js/node/punycode.ts similarity index 100% rename from src/js/node/punycode.js rename to src/js/node/punycode.ts diff --git a/src/js/node/querystring.js b/src/js/node/querystring.ts similarity index 98% rename from src/js/node/querystring.js rename to src/js/node/querystring.ts index d7104cfcda659c..73a9a0ac15a72a 100644 --- a/src/js/node/querystring.js +++ b/src/js/node/querystring.ts @@ -1,4 +1,6 @@ -var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports); +var __commonJS = + (cb, mod: typeof module | undefined = undefined) => + () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports); var Buffer = require("node:buffer").Buffer; diff --git a/src/js/node/readline.js b/src/js/node/readline.ts similarity index 100% rename from src/js/node/readline.js rename to src/js/node/readline.ts diff --git a/src/js/node/stream.consumers.js b/src/js/node/stream.consumers.ts similarity index 100% rename from src/js/node/stream.consumers.js rename to src/js/node/stream.consumers.ts diff --git a/src/js/node/stream.js b/src/js/node/stream.ts similarity index 99% rename from src/js/node/stream.js rename to src/js/node/stream.ts index 245b77eac2a03b..58967763c6ac35 100644 --- a/src/js/node/stream.js +++ b/src/js/node/stream.ts @@ -16,7 +16,7 @@ const { var __getOwnPropNames = Object.getOwnPropertyNames; -var __commonJS = (cb, mod) => +var __commonJS = (cb, mod: typeof module | undefined = undefined) => function __require2() { return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; }; diff --git a/src/js/node/stream.web.js b/src/js/node/stream.web.ts similarity index 100% rename from src/js/node/stream.web.js rename to src/js/node/stream.web.ts diff --git a/src/js/node/timers.promises.js b/src/js/node/timers.promises.ts similarity index 100% rename from src/js/node/timers.promises.js rename to src/js/node/timers.promises.ts diff --git a/src/js/node/timers.js b/src/js/node/timers.ts similarity index 100% rename from src/js/node/timers.js rename to src/js/node/timers.ts diff --git a/src/js/node/tls.js b/src/js/node/tls.ts similarity index 100% rename from src/js/node/tls.js rename to src/js/node/tls.ts diff --git a/src/js/node/url.js b/src/js/node/url.ts similarity index 100% rename from src/js/node/url.js rename to src/js/node/url.ts diff --git a/src/js/node/util.js b/src/js/node/util.ts similarity index 100% rename from src/js/node/util.js rename to src/js/node/util.ts diff --git a/src/js/node/wasi.js b/src/js/node/wasi.ts similarity index 99% rename from src/js/node/wasi.js rename to src/js/node/wasi.ts index 53a74483337576..23c8bfac013758 100644 --- a/src/js/node/wasi.js +++ b/src/js/node/wasi.ts @@ -10,7 +10,7 @@ const nodeFsConstants = $processBindingConstants.fs; var __getOwnPropNames = Object.getOwnPropertyNames; -var __commonJS = (cb, mod) => +var __commonJS = (cb, mod: typeof module | undefined = undefined) => function __require2() { return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; }; diff --git a/src/js/node/zlib.js b/src/js/node/zlib.ts similarity index 99% rename from src/js/node/zlib.js rename to src/js/node/zlib.ts index de1260d0ed575f..938ad6b82a7c60 100644 --- a/src/js/node/zlib.js +++ b/src/js/node/zlib.ts @@ -10,7 +10,7 @@ const Util = require("node:util"); const { isAnyArrayBuffer, isArrayBufferView } = require("node:util/types"); var __getOwnPropNames = Object.getOwnPropertyNames; -var __commonJS = (cb, mod) => +var __commonJS = (cb, mod: typeof module | undefined = undefined) => function __require() { return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; };