Skip to content

Commit 74c415d

Browse files
aduh95RafaelGSS
authored andcommitted
doc: add missing TS formats for load hooks
PR-URL: #57837 Reviewed-By: Marco Ippolito <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Jacob Smith <[email protected]>
1 parent 6592803 commit 74c415d

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

doc/api/module.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1177,14 +1177,16 @@ validating the import attributes.
11771177
11781178
The final value of `format` must be one of the following:
11791179
1180-
| `format` | Description | Acceptable types for `source` returned by `load` |
1181-
| ------------ | ------------------------------ | -------------------------------------------------- |
1182-
| `'addon'` | Load a Node.js addon | {null} |
1183-
| `'builtin'` | Load a Node.js builtin module | {null} |
1184-
| `'commonjs'` | Load a Node.js CommonJS module | {string\|ArrayBuffer\|TypedArray\|null\|undefined} |
1185-
| `'json'` | Load a JSON file | {string\|ArrayBuffer\|TypedArray} |
1186-
| `'module'` | Load an ES module | {string\|ArrayBuffer\|TypedArray} |
1187-
| `'wasm'` | Load a WebAssembly module | {ArrayBuffer\|TypedArray} |
1180+
| `format` | Description | Acceptable types for `source` returned by `load` |
1181+
| ----------------------- | ----------------------------------------------------- | -------------------------------------------------- |
1182+
| `'addon'` | Load a Node.js addon | {null} |
1183+
| `'builtin'` | Load a Node.js builtin module | {null} |
1184+
| `'commonjs-typescript'` | Load a Node.js CommonJS module with TypeScript syntax | {string\|ArrayBuffer\|TypedArray\|null\|undefined} |
1185+
| `'commonjs'` | Load a Node.js CommonJS module | {string\|ArrayBuffer\|TypedArray\|null\|undefined} |
1186+
| `'json'` | Load a JSON file | {string\|ArrayBuffer\|TypedArray} |
1187+
| `'module-typescript'` | Load an ES module with TypeScript syntax | {string\|ArrayBuffer\|TypedArray} |
1188+
| `'module'` | Load an ES module with TypeScript syntax | {string\|ArrayBuffer\|TypedArray} |
1189+
| `'wasm'` | Load a WebAssembly module | {ArrayBuffer\|TypedArray} |
11881190
11891191
The value of `source` is ignored for type `'builtin'` because currently it is
11901192
not possible to replace the value of a Node.js builtin (core) module.

0 commit comments

Comments
 (0)