Skip to content

Commit d2f49e7

Browse files
robpalmeaduh95
authored andcommitted
doc: recommend erasableSyntaxOnly in ts docs
TypeScript 5.8 is now released which adds a new tsconfig flag that aligns with Node's default behavior. https://www.typescriptlang.org/tsconfig/#erasableSyntaxOnly Two weeks ago this options was added to the recommended TSConfig for Node which resides in the tsconfig/bases project. https://github.com/tsconfig/bases/blob/main/bases/node-ts.json PR-URL: #57271 Reviewed-By: Jacob Smith <jacob@frende.me> Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com> Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com> Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Qingyu Deng <i@ayase-lab.com>
1 parent 46b06be commit d2f49e7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

doc/api/typescript.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -76,15 +76,15 @@ generation, and by replacing inline types with whitespace, Node.js can run
7676
TypeScript code without the need for source maps.
7777

7878
Type stripping is compatible with most versions of TypeScript
79-
but we recommend version 5.7 or newer with the following `tsconfig.json` settings:
79+
but we recommend version 5.8 or newer with the following `tsconfig.json` settings:
8080

8181
```json
8282
{
8383
"compilerOptions": {
8484
"target": "esnext",
8585
"module": "nodenext",
86-
"allowImportingTsExtensions": true,
8786
"rewriteRelativeImportExtensions": true,
87+
"erasableSyntaxOnly": true,
8888
"verbatimModuleSyntax": true
8989
}
9090
}

0 commit comments

Comments
 (0)