@@ -777,7 +777,7 @@ Any query parameter or hash in the URL will be accessible via [`import.meta.url`
777777
778778``` bash
779779node --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'
781781node --entry-url ' data:text/javascript,console.log("Hello")'
782782```
783783
@@ -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-async-context-frame `
886886
@@ -1119,17 +1119,6 @@ added:
11191119
11201120Use this flag to enable [ ShadowRealm] [ ] support.
11211121
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-
11331122### ` --experimental-test-coverage `
11341123
11351124<!-- YAML
@@ -1189,7 +1178,7 @@ added: v22.7.0
11891178> Stability: 1.1 - Active development
11901179
11911180Enables the transformation of TypeScript-only syntax into JavaScript code.
1192- Implies ` --experimental-strip-types ` and ` -- enable-source-maps` .
1181+ Implies ` --enable-source-maps ` .
11931182
11941183### ` --experimental-vm-modules `
11951184
@@ -1497,9 +1486,10 @@ added: v12.0.0
14971486
14981487This configures Node.js to interpret ` --eval ` or ` STDIN ` input as CommonJS or
14991488as 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,
15031493Node.js will try to detect the syntax with the following steps:
15041494
150514951 . Run the input as CommonJS.
@@ -1794,6 +1784,21 @@ changes:
17941784
17951785Disable the experimental [ ` node:sqlite ` ] [ ] module.
17961786
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+
17971802### ` --no-experimental-websocket `
17981803
17991804<!-- YAML
@@ -3297,7 +3302,6 @@ one is included in the list below.
32973302* ` --experimental-require-module `
32983303* ` --experimental-shadow-realm `
32993304* ` --experimental-specifier-resolution `
3300- * ` --experimental-strip-types `
33013305* ` --experimental-top-level-await `
33023306* ` --experimental-transform-types `
33033307* ` --experimental-vm-modules `
@@ -3336,6 +3340,7 @@ one is included in the list below.
33363340* ` --no-experimental-global-webcrypto `
33373341* ` --no-experimental-repl-await `
33383342* ` --no-experimental-sqlite `
3343+ * ` --no-experimental-strip-types `
33393344* ` --no-experimental-websocket `
33403345* ` --no-extra-info-on-fatal-exception `
33413346* ` --no-force-async-hooks-checks `
@@ -3870,10 +3875,10 @@ node --stack-trace-limit=12 -p -e "Error.stackTraceLimit" # prints 12
38703875[ `--env-file` ] : #--env-fileconfig
38713876[ `--experimental-default-type=module` ] : #--experimental-default-typetype
38723877[ `--experimental-sea-config` ] : single-executable-applications.md#generating-single-executable-preparation-blobs
3873- [ `--experimental-strip-types` ] : #--experimental-strip-types
38743878[ `--experimental-wasm-modules` ] : #--experimental-wasm-modules
38753879[ `--heap-prof-dir` ] : #--heap-prof-dir
38763880[ `--import` ] : #--importmodule
3881+ [ `--no-experimental-strip-types` ] : #--no-experimental-strip-types
38773882[ `--openssl-config` ] : #--openssl-configfile
38783883[ `--preserve-symlinks` ] : #--preserve-symlinks
38793884[ `--print` ] : #-p---print-script
0 commit comments