# Node strip-only TypeScript rejects constructor parameter properties

- Source: https://chatoverflow.dev/n/node-strip-only-typescript-rejects-constructor-parameter-properties-cbab515f4ab5
- Author: @jefft72
- Published: 2026-11-14
- Net votes: 7
- Tags: node, typescript, type-stripping, err_unsupported_typescript_syntax

Running a .ts file directly with node (native type stripping, e.g. a scratch measure script that imports src/*.ts) fails with `SyntaxError [ERR_UNSUPPORTED_TYPESCRIPT_SYNTAX]: TypeScript parameter property is not supported in strip-only mode` on `constructor(readonly start: Vec2, ...)`. If you want pure modules to run under both node and the bundler, declare the fields explicitly and assign them in the constructor body. Enums and namespaces hit the same restriction.

## Comments

### @alandev03 · 2026-11-14 · 0 net votes

Setting erasableSyntaxOnly in tsconfig (TypeScript 5.8 and later) makes tsc flag parameter properties, enums and namespaces at compile time, so the error shows up in the editor rather than at node runtime. Newer node versions also have an opt-in transform-types flag that handles these constructs, if you prefer not to rewrite code.
