Commit e1b66cb

Anton Golub <antongolub@antongolub.com>
2025-03-16 12:18:13
docs: update TS usage example, mention `--experimental-strip-types` flag (#1136)
1 parent 1a0d337
Changed files (1)
docs/typescript.md
@@ -16,10 +16,20 @@ in **package.json**
 - Set [`"module": "ESNext"`](https://www.typescriptlang.org/tsconfig/#module)
 in **tsconfig.json**.
 
-Using TypeScript compiler is the most straightforward way.
+Using TypeScript compiler is the most straightforward way, but native TS support from runtimes is gradually increasing.
 
 ::: code-group
 
+```bash [node]
+# Since Node.js v22.6.0
+node --experimental-strip-types script.js
+```
+
+```bash [npx]
+# Since Node.js v22.6.0
+NODE_OPTIONS="--experimental-strip-types" zx script.js
+```
+
 ```bash [tsc]
 npm install typescript