From da44725a704288bcd09b8d681c8439c03a388766 Mon Sep 17 00:00:00 2001 From: Hyunbin Seo <47051820+hyunbinseo@users.noreply.github.com> Date: Mon, 8 Sep 2025 19:36:33 +0900 Subject: [PATCH 1/3] docs: update type stripping default versions Signed-off-by: Hyunbin Seo <47051820+hyunbinseo@users.noreply.github.com> --- apps/site/pages/en/learn/typescript/run-natively.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/site/pages/en/learn/typescript/run-natively.md b/apps/site/pages/en/learn/typescript/run-natively.md index f1da8de175753..1465b47538cac 100644 --- a/apps/site/pages/en/learn/typescript/run-natively.md +++ b/apps/site/pages/en/learn/typescript/run-natively.md @@ -6,7 +6,7 @@ authors: AugustinMauroy, khaosdoctor, jakebailey, robpalme # Running TypeScript Natively -Since v23.6.0, Node.js enables "type stripping" by default. If you are using v23.6.0 or later and your source code contains only [erasable typescript syntax](https://devblogs.microsoft.com/typescript/announcing-typescript-5-8-beta/#the---erasablesyntaxonly-option), you do not need this article. +Since v22.18.0 and v23.6.0, Node.js enables "type stripping" by default. If you are using v22.18.0, v23.6.0 or later and your source code contains only [erasable typescript syntax](https://devblogs.microsoft.com/typescript/announcing-typescript-5-8-beta/#the---erasablesyntaxonly-option), you do not need this article. ## Running TypeScript code with Node.js @@ -26,7 +26,7 @@ In V22.7.0 this experimental support was extended to transform TypeScript-only s node --experimental-transform-types another-example.ts ``` -From v23.6.0 onwards, type stripping is enabled by default (you can disable it via [`--no-experimental-strip-types`](https://nodejs.org/docs/latest-v23.x/api/cli.html#--no-experimental-strip-types)), enabling you to run any supported syntax, so running files like the one below with `node file.ts` is supported: +From v22.18.0, v23.6.0 onwards, type stripping is enabled by default (you can disable it via [`--no-experimental-strip-types`](https://nodejs.org/docs/latest-v23.x/api/cli.html#--no-experimental-strip-types)), enabling you to run any supported syntax, so running files like the one below with `node file.ts` is supported: ```ts function foo(bar: number): string { From a75cd138f4154c9924bcaf35641af1046781b00d Mon Sep 17 00:00:00 2001 From: Hyunbin Seo <47051820+hyunbinseo@users.noreply.github.com> Date: Mon, 8 Sep 2025 21:08:56 +0900 Subject: [PATCH 2/3] docs: remove mention of eol 23.6 Signed-off-by: Hyunbin Seo <47051820+hyunbinseo@users.noreply.github.com> --- apps/site/pages/en/learn/typescript/run-natively.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/site/pages/en/learn/typescript/run-natively.md b/apps/site/pages/en/learn/typescript/run-natively.md index 1465b47538cac..6dcb508e5c71e 100644 --- a/apps/site/pages/en/learn/typescript/run-natively.md +++ b/apps/site/pages/en/learn/typescript/run-natively.md @@ -6,7 +6,7 @@ authors: AugustinMauroy, khaosdoctor, jakebailey, robpalme # Running TypeScript Natively -Since v22.18.0 and v23.6.0, Node.js enables "type stripping" by default. If you are using v22.18.0, v23.6.0 or later and your source code contains only [erasable typescript syntax](https://devblogs.microsoft.com/typescript/announcing-typescript-5-8-beta/#the---erasablesyntaxonly-option), you do not need this article. +Since v22.18.0, Node.js enables "type stripping" by default. If you are using v22.18.0 or later and your source code contains only [erasable typescript syntax](https://devblogs.microsoft.com/typescript/announcing-typescript-5-8-beta/#the---erasablesyntaxonly-option), you do not need this article. ## Running TypeScript code with Node.js @@ -26,7 +26,7 @@ In V22.7.0 this experimental support was extended to transform TypeScript-only s node --experimental-transform-types another-example.ts ``` -From v22.18.0, v23.6.0 onwards, type stripping is enabled by default (you can disable it via [`--no-experimental-strip-types`](https://nodejs.org/docs/latest-v23.x/api/cli.html#--no-experimental-strip-types)), enabling you to run any supported syntax, so running files like the one below with `node file.ts` is supported: +From v22.18.0 onwards, type stripping is enabled by default (you can disable it via [`--no-experimental-strip-types`](https://nodejs.org/docs/latest-v23.x/api/cli.html#--no-experimental-strip-types)), enabling you to run any supported syntax, so running files like the one below with `node file.ts` is supported: ```ts function foo(bar: number): string { From b5e645d0f8f87f0f517ef259a3d61853e6631154 Mon Sep 17 00:00:00 2001 From: Hyunbin Seo <47051820+hyunbinseo@users.noreply.github.com> Date: Tue, 9 Sep 2025 09:13:13 +0900 Subject: [PATCH 3/3] docs: use latest-v22.x links Signed-off-by: Hyunbin Seo <47051820+hyunbinseo@users.noreply.github.com> --- apps/site/pages/en/learn/typescript/run-natively.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/site/pages/en/learn/typescript/run-natively.md b/apps/site/pages/en/learn/typescript/run-natively.md index 6dcb508e5c71e..8cf0e350b9781 100644 --- a/apps/site/pages/en/learn/typescript/run-natively.md +++ b/apps/site/pages/en/learn/typescript/run-natively.md @@ -20,13 +20,13 @@ node --experimental-strip-types example.ts And that's it! You can now run TypeScript code directly in Node.js without the need to transpile it first, and use TypeScript to catch type-related errors. -In V22.7.0 this experimental support was extended to transform TypeScript-only syntax, like `enum`s and `namespace`, with the addition of the [`--experimental-transform-types`](https://nodejs.org/docs/latest-v23.x/api/cli.html#--experimental-transform-types) flag. Enabling `--experimental-transform-types` automatically implies that `--experimental-strip-types` is enabled, so there's no need to use both flags in the same command: +In V22.7.0 this experimental support was extended to transform TypeScript-only syntax, like `enum`s and `namespace`, with the addition of the [`--experimental-transform-types`](https://nodejs.org/docs/latest-v22.x/api/cli.html#--experimental-transform-types) flag. Enabling `--experimental-transform-types` automatically implies that `--experimental-strip-types` is enabled, so there's no need to use both flags in the same command: ```bash node --experimental-transform-types another-example.ts ``` -From v22.18.0 onwards, type stripping is enabled by default (you can disable it via [`--no-experimental-strip-types`](https://nodejs.org/docs/latest-v23.x/api/cli.html#--no-experimental-strip-types)), enabling you to run any supported syntax, so running files like the one below with `node file.ts` is supported: +From v22.18.0 onwards, type stripping is enabled by default (you can disable it via [`--no-experimental-strip-types`](https://nodejs.org/docs/latest-v22.x/api/cli.html#--no-experimental-strip-types)), enabling you to run any supported syntax, so running files like the one below with `node file.ts` is supported: ```ts function foo(bar: number): string { @@ -51,7 +51,7 @@ Future versions of Node.js will include support for TypeScript without the need At the time of writing, the experimental support for TypeScript in Node.js has some limitations. -You can get more information on the [API docs](https://nodejs.org/docs/latest-v23.x/api/typescript.html#typescript-features). +You can get more information on the [API docs](https://nodejs.org/docs/latest-v22.x/api/typescript.html#typescript-features). ### Configuration