Skip to content

Commit f127f42

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 8c0368d commit f127f42

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

doc/api/typescript.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,16 +70,16 @@ By intentionally not supporting syntaxes that require JavaScript code
7070
generation, and by replacing inline types with whitespace, Node.js can run
7171
TypeScript code without the need for source maps.
7272

73-
Type stripping works with most versions of TypeScript
74-
but we recommend version 5.7 or newer with the following `tsconfig.json` settings:
73+
Type stripping is compatible with most versions of TypeScript
74+
but we recommend version 5.8 or newer with the following `tsconfig.json` settings:
7575

7676
```json
7777
{
7878
"compilerOptions": {
7979
"target": "esnext",
8080
"module": "nodenext",
81-
"allowImportingTsExtensions": true,
8281
"rewriteRelativeImportExtensions": true,
82+
"erasableSyntaxOnly": true,
8383
"verbatimModuleSyntax": true
8484
}
8585
}

0 commit comments

Comments
 (0)