Skip to content

Commit 4008c65

Browse files
Apply suggestions from code review
Co-authored-by: Joyee Cheung <[email protected]>
1 parent a035e59 commit 4008c65

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lib/internal/vm.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const {
3030
} = require('internal/options');
3131

3232
/**
33-
* Checks if the given object is a context object.
33+
* Checks if the given object is a ContextifyContext
3434
* @param {object} object - The object to check.
3535
* @returns {boolean} - Returns true if the object is a context object, else false.
3636
*/
@@ -41,7 +41,7 @@ function isContext(object) {
4141
}
4242

4343
/**
44-
* Retrieves the host-defined option ID based on the provided importModuleDynamically and hint.
44+
* Computes the host-defined option ID based on the provided importModuleDynamically and hint.
4545
* @param {import('internal/modules/esm/utils').ImportModuleDynamicallyCallback | symbol | undefined} importModuleDynamically -
4646
* The importModuleDynamically function or undefined.
4747
* @param {string} hint - The hint for the option ID.
@@ -80,7 +80,7 @@ function getHostDefinedOptionId(importModuleDynamically, hint) {
8080
}
8181

8282
/**
83-
* Registers a dynamically imported module for customization.
83+
* Registers a compiled referrer for custom import() callback handling in it.
8484
* @param {string} referrer - The path of the referrer module.
8585
* @param {import('internal/modules/esm/utils').ImportModuleDynamicallyCallback | symbol} importModuleDynamically - The
8686
* dynamically imported module function to be registered.
@@ -108,7 +108,7 @@ function registerImportModuleDynamically(referrer, importModuleDynamically) {
108108
* @param {string} filename - The filename to use for the compiled function.
109109
* @param {number} lineOffset - The line offset to use for the compiled function.
110110
* @param {number} columnOffset - The column offset to use for the compiled function.
111-
* @param {Buffer} [cachedData=undefined] - The cached data to use for the compiled function.
111+
* @param {ArrayBufferView} [cachedData=undefined] - The cached data to use for the compiled function.
112112
* @param {boolean} produceCachedData - Whether to produce cached data for the compiled function.
113113
* @param {ReturnType<import('vm').createContext} [parsingContext=undefined] - The parsing context to use for the
114114
* compiled function.
@@ -161,7 +161,7 @@ function internalCompileFunction(
161161
* @param {string} filename - The filename of the script.
162162
* @param {number} lineOffset - The line offset of the script.
163163
* @param {number} columnOffset - The column offset of the script.
164-
* @param {Buffer} cachedData - The cached data of the script.
164+
* @param {ArrayBufferView} cachedData - The cached data of the script.
165165
* @param {boolean} produceCachedData - Indicates whether to produce cached data.
166166
* @param {object} parsingContext - The parsing context of the script.
167167
* @param {symbol} hostDefinedOptionId - The host-defined option ID.

0 commit comments

Comments
 (0)