Skip to content

Commit 7feed99

Browse files
styfleRafaelGSS
authored andcommitted
doc: recommend setting noEmit: true in tsconfig.json
PR-URL: #57320 Fixes: #57294 Reviewed-By: Marco Ippolito <[email protected]> Reviewed-By: Moshe Atlow <[email protected]>
1 parent f5e2b12 commit 7feed99

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

doc/api/typescript.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ but we recommend version 5.8 or newer with the following `tsconfig.json` setting
7676
```json
7777
{
7878
"compilerOptions": {
79+
"noEmit": true, // Optional - see note below
7980
"target": "esnext",
8081
"module": "nodenext",
8182
"rewriteRelativeImportExtensions": true,
@@ -85,6 +86,10 @@ but we recommend version 5.8 or newer with the following `tsconfig.json` setting
8586
}
8687
```
8788

89+
> \[!NOTE]
90+
> Use the `noEmit` option if you intend to only execute `*.ts` files, for example a build script.
91+
> You won't need this flag if you intend to distribute `*.js` files for performance reasons.
92+
8893
### Determining module system
8994

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

0 commit comments

Comments
 (0)