| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 6701360 commit c6fd867
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -48,6 +48,8 @@ const { tracingChannel } = require('diagnostics_channel'); | |||
| 48 | 48 | const onImport = tracingChannel('module.import'); | |
| 49 | 49 | ||
| 50 | 50 | /** | |
| 51 | + * @typedef {import('./hooks.js').HooksProxy} HooksProxy | ||
| 52 | + * @typedef {import('./module_job.js').ModuleJobBase} ModuleJobBase | ||
| 51 | 53 | * @typedef {import('url').URL} URL | |
| 52 | 54 | */ | |
| 53 | 55 | ||
@@ -143,6 +145,7 @@ class ModuleLoader { | |||
| 143 | 145 | * to this property and failure to do so will cause undefined | |
| 144 | 146 | * behavior when invoking `import.meta.resolve`. | |
| 145 | 147 | * @see {ModuleLoader.setCustomizations} | |
| 148 | + * @type {CustomizedModuleLoader} | ||
| 146 | 149 | */ | |
| 147 | 150 | #customizations; | |
| 148 | 151 | ||
@@ -196,7 +199,7 @@ class ModuleLoader { | |||
| 196 | 199 | * | |
| 197 | 200 | * Calling this function alters how modules are loaded and should be | |
| 198 | 201 | * invoked with care. | |
| 199 | - * @param {object} customizations | ||
| 202 | + * @param {CustomizedModuleLoader} customizations | ||
| 200 | 203 | */ | |
| 201 | 204 | setCustomizations(customizations) { | |
| 202 | 205 | this.#customizations = customizations; | |
@@ -236,7 +239,7 @@ class ModuleLoader { | |||
| 236 | 239 | * @param {string} [parentURL] The URL of the module where the module request is initiated. | |
| 237 | 240 | * It's undefined if it's from the root module. | |
| 238 | 241 | * @param {ImportAttributes} importAttributes Attributes from the import statement or expression. | |
| 239 | - * @returns {Promise<ModuleJobBase} | ||
| 242 | + * @returns {Promise<ModuleJobBase>} | ||
| 240 | 243 | */ | |
| 241 | 244 | async getModuleJobForImport(specifier, parentURL, importAttributes) { | |
| 242 | 245 | const resolveResult = await this.resolve(specifier, parentURL, importAttributes); | |
@@ -250,7 +253,7 @@ class ModuleLoader { | |||
| 250 | 253 | * @param {string} specifier See {@link getModuleJobForImport} | |
| 251 | 254 | * @param {string} [parentURL] See {@link getModuleJobForImport} | |
| 252 | 255 | * @param {ImportAttributes} importAttributes See {@link getModuleJobForImport} | |
| 253 | - * @returns {Promise<ModuleJobBase} | ||
| 256 | + * @returns {Promise<ModuleJobBase>} | ||
| 254 | 257 | */ | |
| 255 | 258 | getModuleJobForRequireInImportedCJS(specifier, parentURL, importAttributes) { | |
| 256 | 259 | const resolveResult = this.resolveSync(specifier, parentURL, importAttributes); | |
@@ -622,7 +625,7 @@ class ModuleLoader { | |||
| 622 | 625 | /** | |
| 623 | 626 | * Similar to {@link resolve}, but the results are always synchronously returned. If there are any | |
| 624 | 627 | * asynchronous resolve hooks from module.register(), it will block until the results are returned | |
| 625 | - * from the loader thread for this to be synchornous. | ||
| 628 | + * from the loader thread for this to be synchronous. | ||
| 626 | 629 | * This is here to support `import.meta.resolve()`, `require()` in imported CJS, and | |
| 627 | 630 | * future synchronous hooks. | |
| 628 | 631 | * | |
| Back | FazBrowse Home | New Git URL |
0 commit comments