Skip to content

Commit 525554d

Browse files
Update doc/api/esm.md
Co-authored-by: Derek Lewis <DerekNonGeneric@inf.is>
1 parent 759e4f2 commit 525554d

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

doc/api/esm.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1205,15 +1205,19 @@ of the following:
12051205
| `'builtin'` | Load a Node.js builtin module | Not applicable |
12061206
| `'commonjs'` | Load a Node.js CommonJS module | Not applicable |
12071207
| `'dynamic'` | Use a [dynamic instantiate hook][] | Not applicable |
1208-
| `'json'` | Load a JSON file | array buffer, string, or typed array |
1209-
| `'module'` | Load a standard JavaScript module (ES module) | array buffer, string, or typed array |
1210-
| `'wasm'` | Load a WebAssembly module | array buffer, or typed array |
1208+
| `'json'` | Load a JSON file | { [ArrayBuffer][], [string][], [TypedArray][] } |
1209+
| `'module'` | Load an ES module | { [ArrayBuffer][], [string][], [TypedArray][] } |
1210+
| `'wasm'` | Load a WebAssembly module | { [ArrayBuffer][], [string][], [TypedArray][] } |
1211+
1212+
Note: These types all correspond to classes defined in ECMAScript.
1213+
1214+
* The specific [ArrayBuffer][] object is a [SharedArrayBuffer][].
1215+
* The specific [string][] object is not the class constructor, but an instance.
1216+
* The specific [TypedArray][] object is a [Uint8Array][].
12111217
12121218
Note: If the source value of a text-based format (i.e., `'json'`, `'module'`) is
12131219
not a string, it will be converted to a string using [`util.TextDecoder`][].
12141220
1215-
Note: `Buffer` is a form of typed array.
1216-
12171221
```js
12181222
/**
12191223
* @param {string} url

0 commit comments

Comments
 (0)