This project is read-only.

TypeScript compiler optimization opportunities

Topics: General
Oct 10, 2012 at 7:25 PM

I realize one of the design goals of TypeScript is to output JavaScript similar to what a human being would write, but I think an eventual goal of the project should be to allow the TypeScript compiler to perform code optimizations/minification. This, of course, would only be done when the compiler is run in a "Release" configuration.

With all of the rich type information the compiler knows about the code, it should be able to perform more aggressive optimizations (variable renaming/elimination, function inlining) than your average minifier. This makes it potentially far more powerful than a post-build minifier.


Oct 10, 2012 at 7:41 PM

As long as it's optional I completely agree.

After all, one man's optimisation is another man's bottleneck - especially on lower powered platforms (such as mobile browsers, where I work exclusively)

Oct 11, 2012 at 10:18 AM
Edited Oct 11, 2012 at 10:19 AM