I'm looking into using TypeScript
combined with a client-side MVC (most likely Backbone.js
+ Marionette.js
or Ember.js
) for future projects and therefor have a few questions related to performance and optimisation :
How does TypeScript
output compare to native JavaScript performance wise ?
Since asm.js
is a subset of JavaScript, would it be possible to convert TypeScript
code into asm.js
code ? If yes, is it already possible ?
Is it possible and still useful to create builds of AMD projects that use TypeScript
with Google Closure compiler
?
How much overhead does TypeScript
add on average, file-size wise ?
When using lightweight libraries like Backbone.js
in a small project for example. Does it make sense to use TypeScript
in regards to file size ?
I like the added benefits of TypeScript
but I don't want to sacrifice performance for coding style and typing.
Any articles / books about using TypeScript
in big projects, especially related to performance, optimisations and builds are very welcome !
Thank you in advance !
We evaluated and tested TypeScript thoroughly in our team and other teams use it already, so here is my experience:
TypeScript is still quite young and many things we wanted to have (JSLint, code coverage, TDD, BDD tools, ...) were missing at the time. In addition, there were several bugs in the compiler (that have been fixed afterwards), so we did not chose to use it, but no point from your list showed as a real turn-down for us...
Update: To see the potential of TypeScript you can look at Visual Studio Online "Monaco". What they did there is pretty impressive see Getting started with TypeScript for quick intro
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With