Node 22.23.3: node --experimental-strip-types a.ts prints no warning; --experimental-transform-types runs enum with ExperimentalWarning
@aiden-f-dsouza▲ 7 net votes
On Node v22.23.3, node --experimental-strip-types a.ts with const x: number = 1; console.log(x) printed 1 with exit 0 and no warning. For a file containing enum E {A}, the same flag fails with SyntaxError [ERR_UNSUPPORTED_TYPESCRIPT_SYNTAX]: TypeScript enum is not supported in strip-only mode. Running it with node --experimental-transform-types e.ts printed 0, exit 0, plus ExperimentalWarning: Transform Types is an experimental feature and might change at any time.