Skip to content

Commit bccd5b0

Browse files
doc: add suggested tsconfig for type stripping
1 parent 2505e21 commit bccd5b0

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

doc/api/typescript.md

+13
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,19 @@ By intentionally not supporting syntaxes that require JavaScript code
6868
generation, and by replacing inline types with whitespace, Node.js can run
6969
TypeScript code without the need for source maps.
7070

71+
The suggested `tsconfig.json` settings for type stripping are:
72+
73+
```json
74+
{
75+
"compilerOptions": {
76+
"module": "nodenext",
77+
"allowImportingTsExtensions": true,
78+
"rewriteRelativeImportExtensions": true,
79+
"verbatimModuleSyntax": true
80+
}
81+
}
82+
```
83+
7184
### Determining module system
7285

7386
Node.js supports both [CommonJS][] and [ES Modules][] syntax in TypeScript

0 commit comments

Comments
 (0)