Skip to content

Commit 5c9f1a4

Browse files
styfleaduh95
authored andcommitted
doc: recommend setting noEmit: true in tsconfig.json
PR-URL: #57320 Fixes: #57294 Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
1 parent 75f11ae commit 5c9f1a4

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

doc/api/typescript.md

+5
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ but we recommend version 5.8 or newer with the following `tsconfig.json` setting
8181
```json
8282
{
8383
"compilerOptions": {
84+
"noEmit": true, // Optional - see note below
8485
"target": "esnext",
8586
"module": "nodenext",
8687
"rewriteRelativeImportExtensions": true,
@@ -90,6 +91,10 @@ but we recommend version 5.8 or newer with the following `tsconfig.json` setting
9091
}
9192
```
9293

94+
> \[!NOTE]
95+
> Use the `noEmit` option if you intend to only execute `*.ts` files, for example a build script.
96+
> You won't need this flag if you intend to distribute `*.js` files for performance reasons.
97+
9398
### Determining module system
9499

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

0 commit comments

Comments
 (0)