@@ -777,7 +777,7 @@ Any query parameter or hash in the URL will be accessible via [`import.meta.url`
777
777
778
778
``` bash
779
779
node --entry-url ' file:///path/to/file.js?queryparams=work#and-hashes-too'
780
- node --entry-url --experimental-strip-types ' file.ts?query#hash'
780
+ node --entry-url ' file.ts?query#hash'
781
781
node --entry-url ' data:text/javascript,console.log("Hello")'
782
782
```
783
783
@@ -879,8 +879,8 @@ On Windows, using `cmd.exe` a single quote will not work correctly because it
879
879
only recognizes double ` " ` for quoting. In Powershell or Git bash, both ` ' `
880
880
and ` " ` are usable.
881
881
882
- It is possible to run code containing inline types by passing
883
- [ ` --experimental-strip-types ` ] [ ] .
882
+ It is possible to run code containing inline types unless the
883
+ [ ` --no- experimental-strip-types ` ] [ ] flag is provided .
884
884
885
885
### ` --experimental-async-context-frame `
886
886
@@ -1119,17 +1119,6 @@ added:
1119
1119
1120
1120
Use this flag to enable [ ShadowRealm] [ ] support.
1121
1121
1122
- ### ` --experimental-strip-types `
1123
-
1124
- <!-- YAML
1125
- added: v22.6.0
1126
- -->
1127
-
1128
- > Stability: 1.1 - Active development
1129
-
1130
- Enable experimental type-stripping for TypeScript files.
1131
- For more information, see the [ TypeScript type-stripping] [ ] documentation.
1132
-
1133
1122
### ` --experimental-test-coverage `
1134
1123
1135
1124
<!-- YAML
@@ -1189,7 +1178,7 @@ added: v22.7.0
1189
1178
> Stability: 1.1 - Active development
1190
1179
1191
1180
Enables the transformation of TypeScript-only syntax into JavaScript code.
1192
- Implies ` --experimental-strip-types ` and ` -- enable-source-maps` .
1181
+ Implies ` --enable-source-maps ` .
1193
1182
1194
1183
### ` --experimental-vm-modules `
1195
1184
@@ -1497,9 +1486,10 @@ added: v12.0.0
1497
1486
1498
1487
This configures Node.js to interpret ` --eval ` or ` STDIN ` input as CommonJS or
1499
1488
as an ES module. Valid values are ` "commonjs" ` , ` "module" ` , ` "module-typescript" ` and ` "commonjs-typescript" ` .
1500
- The ` "-typescript" ` values are available only in combination with the flag ` --experimental-strip-types ` .
1501
- The default is ` "commonjs" ` unless [ ` --experimental-default-type=module ` ] [ ] is used.
1502
- If ` --experimental-strip-types ` is enabled and ` --input-type ` is not provided,
1489
+ The ` "-typescript" ` values are not available with the flag ` --no-experimental-strip-types ` .
1490
+ The default is ` "commonjs" ` .
1491
+
1492
+ If ` --input-type ` is not provided,
1503
1493
Node.js will try to detect the syntax with the following steps:
1504
1494
1505
1495
1 . Run the input as CommonJS.
@@ -1794,6 +1784,21 @@ changes:
1794
1784
1795
1785
Disable the experimental [ ` node:sqlite ` ] [ ] module.
1796
1786
1787
+ ### ` --no-experimental-strip-types `
1788
+
1789
+ <!-- YAML
1790
+ added: v22.6.0
1791
+ changes:
1792
+ - version: REPLACEME
1793
+ pr-url: https://github.com/nodejs/node/pull/56350
1794
+ description: Type stripping is enabled by default.
1795
+ -->
1796
+
1797
+ > Stability: 1.1 - Active development
1798
+
1799
+ Disable experimental type-stripping for TypeScript files.
1800
+ For more information, see the [ TypeScript type-stripping] [ ] documentation.
1801
+
1797
1802
### ` --no-experimental-websocket `
1798
1803
1799
1804
<!-- YAML
@@ -3297,7 +3302,6 @@ one is included in the list below.
3297
3302
* ` --experimental-require-module `
3298
3303
* ` --experimental-shadow-realm `
3299
3304
* ` --experimental-specifier-resolution `
3300
- * ` --experimental-strip-types `
3301
3305
* ` --experimental-top-level-await `
3302
3306
* ` --experimental-transform-types `
3303
3307
* ` --experimental-vm-modules `
@@ -3336,6 +3340,7 @@ one is included in the list below.
3336
3340
* ` --no-experimental-global-webcrypto `
3337
3341
* ` --no-experimental-repl-await `
3338
3342
* ` --no-experimental-sqlite `
3343
+ * ` --no-experimental-strip-types `
3339
3344
* ` --no-experimental-websocket `
3340
3345
* ` --no-extra-info-on-fatal-exception `
3341
3346
* ` --no-force-async-hooks-checks `
@@ -3870,10 +3875,10 @@ node --stack-trace-limit=12 -p -e "Error.stackTraceLimit" # prints 12
3870
3875
[ `--env-file` ] : #--env-fileconfig
3871
3876
[ `--experimental-default-type=module` ] : #--experimental-default-typetype
3872
3877
[ `--experimental-sea-config` ] : single-executable-applications.md#generating-single-executable-preparation-blobs
3873
- [ `--experimental-strip-types` ] : #--experimental-strip-types
3874
3878
[ `--experimental-wasm-modules` ] : #--experimental-wasm-modules
3875
3879
[ `--heap-prof-dir` ] : #--heap-prof-dir
3876
3880
[ `--import` ] : #--importmodule
3881
+ [ `--no-experimental-strip-types` ] : #--no-experimental-strip-types
3877
3882
[ `--openssl-config` ] : #--openssl-configfile
3878
3883
[ `--preserve-symlinks` ] : #--preserve-symlinks
3879
3884
[ `--print` ] : #-p---print-script
0 commit comments