@@ -778,7 +778,7 @@ Any query parameter or hash in the URL will be accessible via [`import.meta.url`
778778
779779``` bash
780780node --entry-url ' file:///path/to/file.js?queryparams=work#and-hashes-too'
781- node --entry-url --experimental-strip-types ' file.ts?query#hash'
781+ node --entry-url ' file.ts?query#hash'
782782node --entry-url ' data:text/javascript,console.log("Hello")'
783783```
784784
@@ -878,8 +878,8 @@ On Windows, using `cmd.exe` a single quote will not work correctly because it
878878only recognizes double ` " ` for quoting. In Powershell or Git bash, both ` ' `
879879and ` " ` are usable.
880880
881- It is possible to run code containing inline types by passing
882- [ ` --experimental-strip-types ` ] [ ] .
881+ It is possible to run code containing inline types unless the
882+ [ ` --no- experimental-strip-types ` ] [ ] flag is provided .
883883
884884### ` --experimental-async-context-frame `
885885
@@ -1040,17 +1040,6 @@ added:
10401040
10411041Use this flag to enable [ ShadowRealm] [ ] support.
10421042
1043- ### ` --experimental-strip-types `
1044-
1045- <!-- YAML
1046- added: v22.6.0
1047- -->
1048-
1049- > Stability: 1.1 - Active development
1050-
1051- Enable experimental type-stripping for TypeScript files.
1052- For more information, see the [ TypeScript type-stripping] [ ] documentation.
1053-
10541043### ` --experimental-test-coverage `
10551044
10561045<!-- YAML
@@ -1110,7 +1099,7 @@ added: v22.7.0
11101099> Stability: 1.1 - Active development
11111100
11121101Enables the transformation of TypeScript-only syntax into JavaScript code.
1113- Implies ` --experimental-strip-types ` and ` -- enable-source-maps` .
1102+ Implies ` --enable-source-maps ` .
11141103
11151104### ` --experimental-vm-modules `
11161105
@@ -1415,9 +1404,10 @@ added: v12.0.0
14151404
14161405This configures Node.js to interpret ` --eval ` or ` STDIN ` input as CommonJS or
14171406as an ES module. Valid values are ` "commonjs" ` , ` "module" ` , ` "module-typescript" ` and ` "commonjs-typescript" ` .
1418- The ` "-typescript" ` values are available only in combination with the flag ` --experimental-strip-types ` .
1419- The default is ` "commonjs" ` unless [ ` --experimental-default-type=module ` ] [ ] is used.
1420- If ` --experimental-strip-types ` is enabled and ` --input-type ` is not provided,
1407+ The ` "-typescript" ` values are not available with the flag ` --no-experimental-strip-types ` .
1408+ The default is ` "commonjs" ` .
1409+
1410+ If ` --input-type ` is not provided,
14211411Node.js will try to detect the syntax with the following steps:
14221412
142314131 . Run the input as CommonJS.
@@ -1712,6 +1702,21 @@ changes:
17121702
17131703Disable the experimental [ ` node:sqlite ` ] [ ] module.
17141704
1705+ ### ` --no-experimental-strip-types `
1706+
1707+ <!-- YAML
1708+ added: v22.6.0
1709+ changes:
1710+ - version: REPLACEME
1711+ pr-url: https://github.com/nodejs/node/pull/56350
1712+ description: Type stripping is enabled by default.
1713+ -->
1714+
1715+ > Stability: 1.1 - Active development
1716+
1717+ Disable experimental type-stripping for TypeScript files.
1718+ For more information, see the [ TypeScript type-stripping] [ ] documentation.
1719+
17151720### ` --no-experimental-websocket `
17161721
17171722<!-- YAML
@@ -3145,7 +3150,6 @@ one is included in the list below.
31453150* ` --experimental-require-module `
31463151* ` --experimental-shadow-realm `
31473152* ` --experimental-specifier-resolution `
3148- * ` --experimental-strip-types `
31493153* ` --experimental-top-level-await `
31503154* ` --experimental-transform-types `
31513155* ` --experimental-vm-modules `
@@ -3184,6 +3188,7 @@ one is included in the list below.
31843188* ` --no-experimental-global-webcrypto `
31853189* ` --no-experimental-repl-await `
31863190* ` --no-experimental-sqlite `
3191+ * ` --no-experimental-strip-types `
31873192* ` --no-experimental-websocket `
31883193* ` --no-extra-info-on-fatal-exception `
31893194* ` --no-force-async-hooks-checks `
@@ -3714,10 +3719,10 @@ node --stack-trace-limit=12 -p -e "Error.stackTraceLimit" # prints 12
37143719[ `--env-file` ] : #--env-fileconfig
37153720[ `--experimental-default-type=module` ] : #--experimental-default-typetype
37163721[ `--experimental-sea-config` ] : single-executable-applications.md#generating-single-executable-preparation-blobs
3717- [ `--experimental-strip-types` ] : #--experimental-strip-types
37183722[ `--experimental-wasm-modules` ] : #--experimental-wasm-modules
37193723[ `--heap-prof-dir` ] : #--heap-prof-dir
37203724[ `--import` ] : #--importmodule
3725+ [ `--no-experimental-strip-types` ] : #--no-experimental-strip-types
37213726[ `--openssl-config` ] : #--openssl-configfile
37223727[ `--preserve-symlinks` ] : #--preserve-symlinks
37233728[ `--print` ] : #-p---print-script
0 commit comments