We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
ModuleLoader.load
1 parent 3a0882a commit d633804Copy full SHA for d633804
lib/internal/modules/esm/loader.js
@@ -804,9 +804,9 @@ class ModuleLoader {
804
* if any.
805
* @param {string} url The URL of the module to be loaded.
806
* @param {object} context Metadata about the module
807
- * @returns {Promise<{ format: ModuleFormat, source: ModuleSource }>}
+ * @returns {Promise<{ format: ModuleFormat, source: ModuleSource }> | { format: ModuleFormat, source: ModuleSource }}
808
*/
809
- async load(url, context) {
+ load(url, context) {
810
if (loadHooks.length) {
811
// Has module.registerHooks() hooks, use the synchronous variant that can handle both hooks.
812
return this.#loadSync(url, context);
0 commit comments