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 <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 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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy