Skip to content

Commit 4c978b4

Browse files
committed
doc: fix links in module.md
PR-URL: #56283 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Jacob Smith <jacob@frende.me> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent 46fb69d commit 4c978b4

File tree

1 file changed

+9
-14
lines changed

1 file changed

+9
-14
lines changed

doc/api/module.md

+9-14
Original file line numberDiff line numberDiff line change
@@ -1158,13 +1158,13 @@ validating the import attributes.
11581158
11591159
The final value of `format` must be one of the following:
11601160
1161-
| `format` | Description | Acceptable types for `source` returned by `load` |
1162-
| ------------ | ------------------------------ | -------------------------------------------------------------------------- |
1163-
| `'builtin'` | Load a Node.js builtin module | Not applicable |
1164-
| `'commonjs'` | Load a Node.js CommonJS module | { [`string`][], [`ArrayBuffer`][], [`TypedArray`][], `null`, `undefined` } |
1165-
| `'json'` | Load a JSON file | { [`string`][], [`ArrayBuffer`][], [`TypedArray`][] } |
1166-
| `'module'` | Load an ES module | { [`string`][], [`ArrayBuffer`][], [`TypedArray`][] } |
1167-
| `'wasm'` | Load a WebAssembly module | { [`ArrayBuffer`][], [`TypedArray`][] } |
1161+
| `format` | Description | Acceptable types for `source` returned by `load` |
1162+
| ------------ | ------------------------------ | -------------------------------------------------- |
1163+
| `'builtin'` | Load a Node.js builtin module | {null} |
1164+
| `'commonjs'` | Load a Node.js CommonJS module | {string\|ArrayBuffer\|TypedArray\|null\|undefined} |
1165+
| `'json'` | Load a JSON file | {string\|ArrayBuffer\|TypedArray} |
1166+
| `'module'` | Load an ES module | {string\|ArrayBuffer\|TypedArray} |
1167+
| `'wasm'` | Load a WebAssembly module | {ArrayBuffer\|TypedArray} |
11681168
11691169
The value of `source` is ignored for type `'builtin'` because currently it is
11701170
not possible to replace the value of a Node.js builtin (core) module.
@@ -1221,8 +1221,8 @@ of module format.
12211221
12221222
> These types all correspond to classes defined in ECMAScript.
12231223
1224-
* The specific [`ArrayBuffer`][] object is a [`SharedArrayBuffer`][].
1225-
* The specific [`TypedArray`][] object is a [`Uint8Array`][].
1224+
* The specific {ArrayBuffer} object is a {SharedArrayBuffer}.
1225+
* The specific {TypedArray} object is a {Uint8Array}.
12261226
12271227
If the source value of a text-based format (i.e., `'json'`, `'module'`)
12281228
is not a string, it is converted to a string using [`util.TextDecoder`][].
@@ -1701,14 +1701,10 @@ returned object contains the following keys:
17011701
[`--enable-source-maps`]: cli.md#--enable-source-maps
17021702
[`--import`]: cli.md#--importmodule
17031703
[`--require`]: cli.md#-r---require-module
1704-
[`ArrayBuffer`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer
17051704
[`NODE_COMPILE_CACHE=dir`]: cli.md#node_compile_cachedir
17061705
[`NODE_DISABLE_COMPILE_CACHE=1`]: cli.md#node_disable_compile_cache1
17071706
[`NODE_V8_COVERAGE=dir`]: cli.md#node_v8_coveragedir
1708-
[`SharedArrayBuffer`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer
17091707
[`SourceMap`]: #class-modulesourcemap
1710-
[`TypedArray`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray
1711-
[`Uint8Array`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array
17121708
[`initialize`]: #initialize
17131709
[`module.constants.compileCacheStatus`]: #moduleconstantscompilecachestatus
17141710
[`module.enableCompileCache()`]: #moduleenablecompilecachecachedir
@@ -1718,7 +1714,6 @@ returned object contains the following keys:
17181714
[`os.tmpdir()`]: os.md#ostmpdir
17191715
[`registerHooks`]: #moduleregisterhooksoptions
17201716
[`register`]: #moduleregisterspecifier-parenturl-options
1721-
[`string`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String
17221717
[`util.TextDecoder`]: util.md#class-utiltextdecoder
17231718
[chain]: #chaining
17241719
[hooks]: #customization-hooks

0 commit comments

Comments
 (0)