Skip to content

Commit e6a0cbb

Browse files
LinusUavivkeller
andauthored
docs: update default type stripping Node.js version (#8099)
* docs: update default type stripping Node.js version Signed-off-by: Linus Unnebäck <[email protected]> * doc: avoid mentioning EOL Node.js version Co-authored-by: Aviv Keller <[email protected]> Signed-off-by: Linus Unnebäck <[email protected]> --------- Signed-off-by: Linus Unnebäck <[email protected]> Co-authored-by: Aviv Keller <[email protected]>
1 parent d2e9acd commit e6a0cbb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

apps/site/pages/en/learn/typescript/publishing-a-ts-package.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Some important things to note:
1515

1616
- Fields like `scripts.test` operate on source-code, so they would use the file extensions of the source code (ex `"test": "node --test './src/**/*.test.ts'`).
1717

18-
- Node runs TypeScript code via a process called "[type stripping](https://nodejs.org/api/typescript.html#type-stripping)", wherein node (via [Amaro](https://github.com/nodejs/amaro)) removes TypeScript-specific syntax, leaving behind vanilla JavaScript (which node already understands). This behaviour is enabled by default as of node version 23.6.0.
18+
- Node runs TypeScript code via a process called "[type stripping](https://nodejs.org/api/typescript.html#type-stripping)", wherein node (via [Amaro](https://github.com/nodejs/amaro)) removes TypeScript-specific syntax, leaving behind vanilla JavaScript (which node already understands). This behaviour is enabled by default as of node version 22.18.0.
1919
- Node does **not** strip types in `node_modules` because it can cause significant performance issues for the official TypeScript compiler (`tsc`) and parts of VS Code, so the TypeScript maintainers would like to discourage people publishing raw TypeScript, at least for now.
2020

2121
- Consuming TypeScript-specific features like `enum` in node still requires a flag ([`--experimental-transform-types`](https://nodejs.org/api/typescript.html#typescript-features)). There are often better alternatives for these anyway.

0 commit comments

Comments
 (0)