upvote
Type stripping cannot ignore tsconfig.

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

reply
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.

reply
That's for running your own code. Not for running other people's code.
reply
I presume you didn't get the "Let me sign a deal with the devil!"-part OP mentioned in TFA then.
reply
Yes, but your TypeScript code has to be checked against the libraries in node_modules, and it is significantly costlier to check against implementation files (the .ts/.mts files) than the produced declaration files (the .d.ts files).
reply
Sure, that's all correct, of course a performance hit would be noticeable if thousands of dependencies would need to be checked additionally.

OP is talking about type stripping nonetheless, and I'd put type stripping into the same ballpark as reading ambient declarations, performance wise.

reply