@@ -779,7 +779,7 @@ Any query parameter or hash in the URL will be accessible via [`import.meta.url`
779
779
780
780
``` bash
781
781
node --entry-url ' file:///path/to/file.js?queryparams=work#and-hashes-too'
782
- node --entry-url --experimental-strip-types ' file.ts?query#hash'
782
+ node --entry-url ' file.ts?query#hash'
783
783
node --entry-url ' data:text/javascript,console.log("Hello")'
784
784
```
785
785
@@ -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-addon-modules `
886
886
@@ -1020,17 +1020,6 @@ added:
1020
1020
1021
1021
Use this flag to enable [ ShadowRealm] [ ] support.
1022
1022
1023
- ### ` --experimental-strip-types `
1024
-
1025
- <!-- YAML
1026
- added: v22.6.0
1027
- -->
1028
-
1029
- > Stability: 1.1 - Active development
1030
-
1031
- Enable experimental type-stripping for TypeScript files.
1032
- For more information, see the [ TypeScript type-stripping] [ ] documentation.
1033
-
1034
1023
### ` --experimental-test-coverage `
1035
1024
1036
1025
<!-- YAML
@@ -1071,7 +1060,7 @@ added: v22.7.0
1071
1060
> Stability: 1.1 - Active development
1072
1061
1073
1062
Enables the transformation of TypeScript-only syntax into JavaScript code.
1074
- Implies ` --experimental-strip-types ` and ` -- enable-source-maps` .
1063
+ Implies ` --enable-source-maps ` .
1075
1064
1076
1065
### ` --experimental-vm-modules `
1077
1066
@@ -1382,10 +1371,10 @@ added: v12.0.0
1382
1371
1383
1372
This configures Node.js to interpret ` --eval ` or ` STDIN ` input as CommonJS or
1384
1373
as an ES module. Valid values are ` "commonjs" ` , ` "module" ` , ` "module-typescript" ` and ` "commonjs-typescript" ` .
1385
- The ` "-typescript" ` values are available only in combination with the flag ` --experimental-strip-types ` .
1374
+ The ` "-typescript" ` values are not available with the flag ` --no -experimental-strip-types ` .
1386
1375
The default is ` "commonjs" ` .
1387
1376
1388
- If ` --experimental-strip-types ` is enabled and ` -- input-type` is not provided,
1377
+ If ` --input-type ` is not provided,
1389
1378
Node.js will try to detect the syntax with the following steps:
1390
1379
1391
1380
1 . Run the input as CommonJS.
@@ -1660,6 +1649,21 @@ changes:
1660
1649
1661
1650
Disable the experimental [ ` node:sqlite ` ] [ ] module.
1662
1651
1652
+ ### ` --no-experimental-strip-types `
1653
+
1654
+ <!-- YAML
1655
+ added: v22.6.0
1656
+ changes:
1657
+ - version: REPLACEME
1658
+ pr-url: https://github.com/nodejs/node/pull/56350
1659
+ description: Type stripping is enabled by default.
1660
+ -->
1661
+
1662
+ > Stability: 1.1 - Active development
1663
+
1664
+ Disable experimental type-stripping for TypeScript files.
1665
+ For more information, see the [ TypeScript type-stripping] [ ] documentation.
1666
+
1663
1667
### ` --no-experimental-websocket `
1664
1668
1665
1669
<!-- YAML
@@ -3087,7 +3091,6 @@ one is included in the list below.
3087
3091
* ` --experimental-require-module `
3088
3092
* ` --experimental-shadow-realm `
3089
3093
* ` --experimental-specifier-resolution `
3090
- * ` --experimental-strip-types `
3091
3094
* ` --experimental-test-isolation `
3092
3095
* ` --experimental-top-level-await `
3093
3096
* ` --experimental-transform-types `
@@ -3124,6 +3127,7 @@ one is included in the list below.
3124
3127
* ` --no-experimental-global-navigator `
3125
3128
* ` --no-experimental-repl-await `
3126
3129
* ` --no-experimental-sqlite `
3130
+ * ` --no-experimental-strip-types `
3127
3131
* ` --no-experimental-websocket `
3128
3132
* ` --no-extra-info-on-fatal-exception `
3129
3133
* ` --no-force-async-hooks-checks `
@@ -3648,10 +3652,10 @@ node --stack-trace-limit=12 -p -e "Error.stackTraceLimit" # prints 12
3648
3652
[ `--env-file` ] : #--env-fileconfig
3649
3653
[ `--experimental-addon-modules` ] : #--experimental-addon-modules
3650
3654
[ `--experimental-sea-config` ] : single-executable-applications.md#generating-single-executable-preparation-blobs
3651
- [ `--experimental-strip-types` ] : #--experimental-strip-types
3652
3655
[ `--experimental-wasm-modules` ] : #--experimental-wasm-modules
3653
3656
[ `--heap-prof-dir` ] : #--heap-prof-dir
3654
3657
[ `--import` ] : #--importmodule
3658
+ [ `--no-experimental-strip-types` ] : #--no-experimental-strip-types
3655
3659
[ `--openssl-config` ] : #--openssl-configfile
3656
3660
[ `--preserve-symlinks` ] : #--preserve-symlinks
3657
3661
[ `--print` ] : #-p---print-script
0 commit comments