@@ -779,7 +779,7 @@ Any query parameter or hash in the URL will be accessible via [`import.meta.url`
779779
780780``` bash
781781node --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'
783783node --entry-url ' data:text/javascript,console.log("Hello")'
784784```
785785
@@ -879,8 +879,8 @@ On Windows, using `cmd.exe` a single quote will not work correctly because it
879879only recognizes double ` " ` for quoting. In Powershell or Git bash, both ` ' `
880880and ` " ` are usable.
881881
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 .
884884
885885### ` --experimental-addon-modules `
886886
@@ -1020,17 +1020,6 @@ added:
10201020
10211021Use this flag to enable [ ShadowRealm] [ ] support.
10221022
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-
10341023### ` --experimental-test-coverage `
10351024
10361025<!-- YAML
@@ -1071,7 +1060,7 @@ added: v22.7.0
10711060> Stability: 1.1 - Active development
10721061
10731062Enables the transformation of TypeScript-only syntax into JavaScript code.
1074- Implies ` --experimental-strip-types ` and ` -- enable-source-maps` .
1063+ Implies ` --enable-source-maps ` .
10751064
10761065### ` --experimental-vm-modules `
10771066
@@ -1382,10 +1371,10 @@ added: v12.0.0
13821371
13831372This configures Node.js to interpret ` --eval ` or ` STDIN ` input as CommonJS or
13841373as 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 ` .
13861375The default is ` "commonjs" ` .
13871376
1388- If ` --experimental-strip-types ` is enabled and ` -- input-type` is not provided,
1377+ If ` --input-type ` is not provided,
13891378Node.js will try to detect the syntax with the following steps:
13901379
139113801 . Run the input as CommonJS.
@@ -1660,6 +1649,21 @@ changes:
16601649
16611650Disable the experimental [ ` node:sqlite ` ] [ ] module.
16621651
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+
16631667### ` --no-experimental-websocket `
16641668
16651669<!-- YAML
@@ -3087,7 +3091,6 @@ one is included in the list below.
30873091* ` --experimental-require-module `
30883092* ` --experimental-shadow-realm `
30893093* ` --experimental-specifier-resolution `
3090- * ` --experimental-strip-types `
30913094* ` --experimental-test-isolation `
30923095* ` --experimental-top-level-await `
30933096* ` --experimental-transform-types `
@@ -3124,6 +3127,7 @@ one is included in the list below.
31243127* ` --no-experimental-global-navigator `
31253128* ` --no-experimental-repl-await `
31263129* ` --no-experimental-sqlite `
3130+ * ` --no-experimental-strip-types `
31273131* ` --no-experimental-websocket `
31283132* ` --no-extra-info-on-fatal-exception `
31293133* ` --no-force-async-hooks-checks `
@@ -3648,10 +3652,10 @@ node --stack-trace-limit=12 -p -e "Error.stackTraceLimit" # prints 12
36483652[ `--env-file` ] : #--env-fileconfig
36493653[ `--experimental-addon-modules` ] : #--experimental-addon-modules
36503654[ `--experimental-sea-config` ] : single-executable-applications.md#generating-single-executable-preparation-blobs
3651- [ `--experimental-strip-types` ] : #--experimental-strip-types
36523655[ `--experimental-wasm-modules` ] : #--experimental-wasm-modules
36533656[ `--heap-prof-dir` ] : #--heap-prof-dir
36543657[ `--import` ] : #--importmodule
3658+ [ `--no-experimental-strip-types` ] : #--no-experimental-strip-types
36553659[ `--openssl-config` ] : #--openssl-configfile
36563660[ `--preserve-symlinks` ] : #--preserve-symlinks
36573661[ `--print` ] : #-p---print-script
0 commit comments