3 ms·
> there would still be a need to strip out the types simply from the perspective of minimizing JavaScript bundle sizes. Are you really sure? To me that attitu
by josteink 8y ago
> there would still be a need to strip out the types simply from the perspective of minimizing JavaScript bundle sizes.
Are you really sure?
To me that attitude sounds awfully close to cargo-culting.
- sbjs 8y agoHow is that cargo-culting? GP's comment doesn't even seem to come close to the meaning of cargo-culting. And yes, type definitions in my projects account for a good percentage, anywhere from 5-25% of each file, if you take into account all the interfaces, parameter definitions, class types... So that's removing 5-25% of your minified JS bundle, and if we're talking a 4mb bundle, that could be 1mb of type information, completely useless at runtime. If you needed to map that type information to your source code, this is what source maps are for!