Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit c85b386

Browse filesBrowse files
JakobJingleheimerCeres6
authored andcommitted
esm: fix jsdoc type refs to ModuleJobBase in esm/loader
Co-Authored-By: Carlos Espa <43477095+Ceres6@users.noreply.github.com> PR-URL: #56499 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
1 parent ff8af58 commit c85b386
Copy full SHA for c85b386

File tree

Expand file treeCollapse file tree

1 file changed

+7
-4
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+7
-4
lines changed
Open diff view settings
Collapse file

‎lib/internal/modules/esm/loader.js‎

Copy file name to clipboardExpand all lines: lib/internal/modules/esm/loader.js
+7-4Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ const {
4343
let defaultResolve, defaultLoad, defaultLoadSync, importMetaInitializer;
4444

4545
/**
46+
* @typedef {import('./hooks.js').HooksProxy} HooksProxy
47+
* @typedef {import('./module_job.js').ModuleJobBase} ModuleJobBase
4648
* @typedef {import('url').URL} URL
4749
*/
4850

@@ -138,6 +140,7 @@ class ModuleLoader {
138140
* to this property and failure to do so will cause undefined
139141
* behavior when invoking `import.meta.resolve`.
140142
* @see {ModuleLoader.setCustomizations}
143+
* @type {CustomizedModuleLoader}
141144
*/
142145
#customizations;
143146

@@ -194,7 +197,7 @@ class ModuleLoader {
194197
*
195198
* Calling this function alters how modules are loaded and should be
196199
* invoked with care.
197-
* @param {object} customizations
200+
* @param {CustomizedModuleLoader} customizations
198201
*/
199202
setCustomizations(customizations) {
200203
this.#customizations = customizations;
@@ -227,7 +230,7 @@ class ModuleLoader {
227230
* @param {string} [parentURL] The URL of the module where the module request is initiated.
228231
* It's undefined if it's from the root module.
229232
* @param {ImportAttributes} importAttributes Attributes from the import statement or expression.
230-
* @returns {Promise<ModuleJobBase}
233+
* @returns {Promise<ModuleJobBase>}
231234
*/
232235
async getModuleJobForImport(specifier, parentURL, importAttributes) {
233236
const resolveResult = await this.resolve(specifier, parentURL, importAttributes);
@@ -241,7 +244,7 @@ class ModuleLoader {
241244
* @param {string} specifier See {@link getModuleJobForImport}
242245
* @param {string} [parentURL] See {@link getModuleJobForImport}
243246
* @param {ImportAttributes} importAttributes See {@link getModuleJobForImport}
244-
* @returns {Promise<ModuleJobBase}
247+
* @returns {Promise<ModuleJobBase>}
245248
*/
246249
getModuleJobForRequireInImportedCJS(specifier, parentURL, importAttributes) {
247250
const resolveResult = this.resolveSync(specifier, parentURL, importAttributes);
@@ -607,7 +610,7 @@ class ModuleLoader {
607610
/**
608611
* Similar to {@link resolve}, but the results are always synchronously returned. If there are any
609612
* asynchronous resolve hooks from module.register(), it will block until the results are returned
610-
* from the loader thread for this to be synchornous.
613+
* from the loader thread for this to be synchronous.
611614
* This is here to support `import.meta.resolve()`, `require()` in imported CJS, and
612615
* future synchronous hooks.
613616
*

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.