logoalt Hacker News

DanRosenwasser • today at 6:48 AM • 1 reply • view on HN

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


Replies

whilenot-dev • today at 7:57 AM

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.