@@ -780,7 +780,7 @@ Any query parameter or hash in the URL will be accessible via [`import.meta.url`
780780
781781``` bash
782782node --entry-url ' file:///path/to/file.js?queryparams=work#and-hashes-too'
783- node --entry-url --experimental-strip-types ' file.ts?query#hash'
783+ node --entry-url ' file.ts?query#hash'
784784node --entry-url ' data:text/javascript,console.log("Hello")'
785785```
786786
@@ -880,8 +880,8 @@ On Windows, using `cmd.exe` a single quote will not work correctly because it
880880only recognizes double ` " ` for quoting. In Powershell or Git bash, both ` ' `
881881and ` " ` are usable.
882882
883- It is possible to run code containing inline types by passing
884- [ ` --experimental-strip-types ` ] [ ] .
883+ It is possible to run code containing inline types unless the
884+ [ ` --no- experimental-strip-types ` ] [ ] flag is provided .
885885
886886### ` --experimental-addon-modules `
887887
@@ -1008,17 +1008,6 @@ added:
10081008
10091009Use this flag to enable [ ShadowRealm] [ ] support.
10101010
1011- ### ` --experimental-strip-types `
1012-
1013- <!-- YAML
1014- added: v22.6.0
1015- -->
1016-
1017- > Stability: 1.1 - Active development
1018-
1019- Enable experimental type-stripping for TypeScript files.
1020- For more information, see the [ TypeScript type-stripping] [ ] documentation.
1021-
10221011### ` --experimental-test-coverage `
10231012
10241013<!-- YAML
@@ -1059,7 +1048,7 @@ added: v22.7.0
10591048> Stability: 1.1 - Active development
10601049
10611050Enables the transformation of TypeScript-only syntax into JavaScript code.
1062- Implies ` --experimental-strip-types ` and ` -- enable-source-maps` .
1051+ Implies ` --enable-source-maps ` .
10631052
10641053### ` --experimental-vm-modules `
10651054
@@ -1370,10 +1359,10 @@ added: v12.0.0
13701359
13711360This configures Node.js to interpret ` --eval ` or ` STDIN ` input as CommonJS or
13721361as an ES module. Valid values are ` "commonjs" ` , ` "module" ` , ` "module-typescript" ` and ` "commonjs-typescript" ` .
1373- The ` "-typescript" ` values are available only in combination with the flag ` --experimental-strip-types ` .
1362+ The ` "-typescript" ` values are not available with the flag ` --no -experimental-strip-types ` .
13741363The default is ` "commonjs" ` .
13751364
1376- If ` --experimental-strip-types ` is enabled and ` -- input-type` is not provided,
1365+ If ` --input-type ` is not provided,
13771366Node.js will try to detect the syntax with the following steps:
13781367
137913681 . Run the input as CommonJS.
@@ -1663,6 +1652,21 @@ changes:
16631652
16641653Disable the experimental [ ` node:sqlite ` ] [ ] module.
16651654
1655+ ### ` --no-experimental-strip-types `
1656+
1657+ <!-- YAML
1658+ added: v22.6.0
1659+ changes:
1660+ - version: REPLACEME
1661+ pr-url: https://github.com/nodejs/node/pull/56350
1662+ description: Type stripping is enabled by default.
1663+ -->
1664+
1665+ > Stability: 1.1 - Active development
1666+
1667+ Disable experimental type-stripping for TypeScript files.
1668+ For more information, see the [ TypeScript type-stripping] [ ] documentation.
1669+
16661670### ` --no-experimental-websocket `
16671671
16681672<!-- YAML
@@ -3089,7 +3093,6 @@ one is included in the list below.
30893093* ` --experimental-require-module `
30903094* ` --experimental-shadow-realm `
30913095* ` --experimental-specifier-resolution `
3092- * ` --experimental-strip-types `
30933096* ` --experimental-test-isolation `
30943097* ` --experimental-top-level-await `
30953098* ` --experimental-transform-types `
@@ -3127,6 +3130,7 @@ one is included in the list below.
31273130* ` --no-experimental-global-navigator `
31283131* ` --no-experimental-repl-await `
31293132* ` --no-experimental-sqlite `
3133+ * ` --no-experimental-strip-types `
31303134* ` --no-experimental-websocket `
31313135* ` --no-extra-info-on-fatal-exception `
31323136* ` --no-force-async-hooks-checks `
@@ -3651,10 +3655,10 @@ node --stack-trace-limit=12 -p -e "Error.stackTraceLimit" # prints 12
36513655[ `--env-file` ] : #--env-fileconfig
36523656[ `--experimental-addon-modules` ] : #--experimental-addon-modules
36533657[ `--experimental-sea-config` ] : single-executable-applications.md#generating-single-executable-preparation-blobs
3654- [ `--experimental-strip-types` ] : #--experimental-strip-types
36553658[ `--experimental-wasm-modules` ] : #--experimental-wasm-modules
36563659[ `--heap-prof-dir` ] : #--heap-prof-dir
36573660[ `--import` ] : #--importmodule
3661+ [ `--no-experimental-strip-types` ] : #--no-experimental-strip-types
36583662[ `--openssl-config` ] : #--openssl-configfile
36593663[ `--preserve-symlinks` ] : #--preserve-symlinks
36603664[ `--print` ] : #-p---print-script
0 commit comments