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 46bee52

Browse filesBrowse 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 <raisinten@gmail.com> Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
1 parent 5946785 commit 46bee52
Copy full SHA for 46bee52

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

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

‎doc/api/vm.md‎

Copy file name to clipboardExpand all lines: doc/api/vm.md
+7-7Lines changed: 7 additions & 7 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -1044,13 +1044,13 @@ changes:
10441044
* `contextExtensions` {Object\[]} An array containing a collection of context
10451045
extensions (objects wrapping the current scope) to be applied while
10461046
compiling. **Default:** `[]`.
1047-
* `importModuleDynamically`
1048-
{Function|vm.constants.USE\_MAIN\_CONTEXT\_DEFAULT\_LOADER}
1049-
Used to specify the how the modules should be loaded during the evaluation of
1050-
this function when `import()` is called. This option is part of the
1051-
experimental modules API. We do not recommend using it in a production
1052-
environment. For detailed information, see
1053-
[Support of dynamic `import()` in compilation APIs][].
1047+
* `importModuleDynamically`
1048+
{Function|vm.constants.USE\_MAIN\_CONTEXT\_DEFAULT\_LOADER}
1049+
Used to specify the how the modules should be loaded during the evaluation of
1050+
this function when `import()` is called. This option is part of the
1051+
experimental modules API. We do not recommend using it in a production
1052+
environment. For detailed information, see
1053+
[Support of dynamic `import()` in compilation APIs][].
10541054
* Returns: {Function}
10551055

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

0 commit comments

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