logoalt Hacker News

zarzavat • today at 7:41 AM • 1 reply • view on HN

Type stripping cannot ignore tsconfig.

TypeScript has different semantics depending on settings in tsconfig e.g. useDefineForClassFields


Replies

whilenot-dev • today at 7:50 AM

Type stripping can and does ignore tsconfig.json files, from the provided link:

> Node.js ignores tsconfig.json files and therefore features that depend on settings within tsconfig.json, such as paths or converting newer JavaScript syntax to older standards, are intentionally unsupported.

Of course import aliases and such features would break.