Skip to content

Commit fd44af7

Browse files
hkleungaimarco-ippolito
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 0fdcc0d commit fd44af7

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
@@ -1037,13 +1037,13 @@ changes:
10371037
* `contextExtensions` {Object\[]} An array containing a collection of context
10381038
extensions (objects wrapping the current scope) to be applied while
10391039
compiling. **Default:** `[]`.
1040-
* `importModuleDynamically`
1041-
{Function|vm.constants.USE\_MAIN\_CONTEXT\_DEFAULT\_LOADER}
1042-
Used to specify the how the modules should be loaded during the evaluation of
1043-
this function when `import()` is called. This option is part of the
1044-
experimental modules API. We do not recommend using it in a production
1045-
environment. For detailed information, see
1046-
[Support of dynamic `import()` in compilation APIs][].
1040+
* `importModuleDynamically`
1041+
{Function|vm.constants.USE\_MAIN\_CONTEXT\_DEFAULT\_LOADER}
1042+
Used to specify the how the modules should be loaded during the evaluation of
1043+
this function when `import()` is called. This option is part of the
1044+
experimental modules API. We do not recommend using it in a production
1045+
environment. For detailed information, see
1046+
[Support of dynamic `import()` in compilation APIs][].
10471047
* Returns: {Function}
10481048

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

0 commit comments

Comments
 (0)