Skip to content

Commit 93d19ec

Browse files
committed
doc: add missing TS formats for load hooks
PR-URL: #57837 Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Jacob Smith <jacob@frende.me>
1 parent b362339 commit 93d19ec

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

doc/api/module.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1327,13 +1327,15 @@ validating the import attributes.
13271327
13281328
The final value of `format` must be one of the following:
13291329
1330-
| `format` | Description | Acceptable types for `source` returned by `load` |
1331-
| ------------ | ------------------------------ | -------------------------------------------------- |
1332-
| `'builtin'` | Load a Node.js builtin module | {null} |
1333-
| `'commonjs'` | Load a Node.js CommonJS module | {string\|ArrayBuffer\|TypedArray\|null\|undefined} |
1334-
| `'json'` | Load a JSON file | {string\|ArrayBuffer\|TypedArray} |
1335-
| `'module'` | Load an ES module | {string\|ArrayBuffer\|TypedArray} |
1336-
| `'wasm'` | Load a WebAssembly module | {ArrayBuffer\|TypedArray} |
1330+
| `format` | Description | Acceptable types for `source` returned by `load` |
1331+
| ----------------------- | ----------------------------------------------------- | -------------------------------------------------- |
1332+
| `'builtin'` | Load a Node.js builtin module | {null} |
1333+
| `'commonjs-typescript'` | Load a Node.js CommonJS module with TypeScript syntax | {string\|ArrayBuffer\|TypedArray\|null\|undefined} |
1334+
| `'commonjs'` | Load a Node.js CommonJS module | {string\|ArrayBuffer\|TypedArray\|null\|undefined} |
1335+
| `'json'` | Load a JSON file | {string\|ArrayBuffer\|TypedArray} |
1336+
| `'module-typescript'` | Load an ES module with TypeScript syntax | {string\|ArrayBuffer\|TypedArray} |
1337+
| `'module'` | Load an ES module with TypeScript syntax | {string\|ArrayBuffer\|TypedArray} |
1338+
| `'wasm'` | Load a WebAssembly module | {ArrayBuffer\|TypedArray} |
13371339
13381340
The value of `source` is ignored for type `'builtin'` because currently it is
13391341
not possible to replace the value of a Node.js builtin (core) module.

0 commit comments

Comments
 (0)