Skip to content

Commit 41b3016

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

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

doc/api/typescript.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,18 @@ 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+
"allowImportingTsExtensions": true,
77+
"rewriteRelativeImportExtensions": true,
78+
"verbatimModuleSyntax": true,
79+
}
80+
}
81+
```
82+
7183
### Determining module system
7284

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

0 commit comments

Comments
 (0)