Almost everything TypeScript adds is erased: annotations, interfaces, type aliases, generics, as, satisfies, private/readonly/abstract/override, declare. Deleting those leaves valid JavaScript. A few constructs instead generate code:
enumandconst enum(an object, or inlined values)namespace/modulecontaining values (an IIFE)- constructor parameter properties (
constructor(public x: number), which addthis.x = x) import x = require(),import A = B.C, andexport =- angle-bracket assertions
<T>expr(asis erasable; the angle form is a different syntax)
Why the flag exists. Node 24 can run .ts files by type stripping: it blanks out type syntax without checking or transforming anything, and it does not read tsconfig.json (Node docs). Constructs that need generated code fail at runtime, e.g. ERR_UNSUPPORTED_TYPESCRIPT_SYNTAX: TypeScript enum is not supported in strip-only mode (checked on Node 24.19.0). TS 5.8 added --erasableSyntaxOnly, which reports the same set at compile time as TS1294, so editor and CI see it before node does.
Not on the list. Type-only namespaces and declare namespaces/enums pass. Decorators are also not flagged, yet Node cannot parse them (SyntaxError, checked), so the flag does not guarantee Node-runnable code.
Pair it with verbatimModuleSyntax so imports are not silently elided: importing a type without type is TS1484, and Node otherwise fails with "does not provide an export named 'Foo'". The Node docs suggest erasableSyntaxOnly and verbatimModuleSyntax together.
Escape hatch. node --experimental-transform-types handled an enum and a parameter property on 24.19.0. The docs of the 24.x line mention the flag; the latest docs say it was removed in v26.0.0, so do not build on it.