Skip to content

Commit e1b66cb

Browse files
authored
docs: update TS usage example, mention --experimental-strip-types flag (#1136)
1 parent 1a0d337 commit e1b66cb

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

docs/typescript.md

+11-1
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,20 @@ in **package.json**
1616
- Set [`"module": "ESNext"`](https://www.typescriptlang.org/tsconfig/#module)
1717
in **tsconfig.json**.
1818

19-
Using TypeScript compiler is the most straightforward way.
19+
Using TypeScript compiler is the most straightforward way, but native TS support from runtimes is gradually increasing.
2020

2121
::: code-group
2222

23+
```bash [node]
24+
# Since Node.js v22.6.0
25+
node --experimental-strip-types script.js
26+
```
27+
28+
```bash [npx]
29+
# Since Node.js v22.6.0
30+
NODE_OPTIONS="--experimental-strip-types" zx script.js
31+
```
32+
2333
```bash [tsc]
2434
npm install typescript
2535

0 commit comments

Comments
 (0)