Skip to content

Commit 0d3ec1a

Browse files
hkleungaiaduh95
authored andcommitted
doc: fix misaligned options in vm.compileFunction()
Current alignment mislead doc reader into thinking `importModuleDynamically` is a separate positional param right next to `options`, which is incorrect and need to be fixed. This misalignment is introduced in a PR merged in Feb 2024. I belive this doc fix applies to node v20 and above. Refs: #51244 PR-URL: #58145 Reviewed-By: Darshan Sen <[email protected]> Reviewed-By: Daeyeon Jeong <[email protected]>
1 parent 1f70baf commit 0d3ec1a

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

doc/api/vm.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1042,13 +1042,13 @@ changes:
10421042
* `contextExtensions` {Object\[]} An array containing a collection of context
10431043
extensions (objects wrapping the current scope) to be applied while
10441044
compiling. **Default:** `[]`.
1045-
* `importModuleDynamically`
1046-
{Function|vm.constants.USE\_MAIN\_CONTEXT\_DEFAULT\_LOADER}
1047-
Used to specify the how the modules should be loaded during the evaluation of
1048-
this function when `import()` is called. This option is part of the
1049-
experimental modules API. We do not recommend using it in a production
1050-
environment. For detailed information, see
1051-
[Support of dynamic `import()` in compilation APIs][].
1045+
* `importModuleDynamically`
1046+
{Function|vm.constants.USE\_MAIN\_CONTEXT\_DEFAULT\_LOADER}
1047+
Used to specify the how the modules should be loaded during the evaluation of
1048+
this function when `import()` is called. This option is part of the
1049+
experimental modules API. We do not recommend using it in a production
1050+
environment. For detailed information, see
1051+
[Support of dynamic `import()` in compilation APIs][].
10521052
* Returns: {Function}
10531053

10541054
Compiles the given code into the provided context (if no context is

0 commit comments

Comments
 (0)