This post is article-7 from the 30 Articles App series for SharePoint.
1st Oct 2012 was the day when Microsoft has released TypeScript.
It was too tempting and I could not stop myself including it in this series 🙂 !!
What is TypeScript ?
Any browser. Any host. Any OS. Open Source.
Why Should you use TypeScript as a Microsoft Technology Developer ? :
Many people who use Dart or CoffeScript are not convinced with the idea behind creating TypeScript and there are mix responses for TypeScript in Developer Community. It makes much more sense when you believe that TypeScript is created to help Microsoft Developer Community.
You can use Visual Studio ==> familiar tool for development.
Get the Visual Studio TypeScript Plugin from here .
You can create JS code faster, robust and more manageable finally with class :P!
It has classes, modules, and interfaces.
It is statically typed so will provide auto-completion for statements and point out binding errors at compile time. ( very important feature for debugging + creating error free code )
I would never compare TypeScript with Dart and CoffeScript. It’s just not fair. But below is for those who compare 😉
Advantage over Dart :
Dart is written from scratch while TypeScript is build on JS. In short whatever you write in JS , you use it without any change in TypeScript.
Advantage over CoffeeScript :
CoffeeScript has its own syntax so you need to learn it while TypeScript is super-set of JS so virtually there is no learning curve.
I do quite like CoffeeScript and also see a good potential for TypeScript. TypeScript is like CoffeeScript on Steroids 🙂 .
Shall I use it for SharePoint 2013 Apps?
Remember Article-1 : There is a big NO to any server-side code for SharePoint Hosted Apps.
I want you to explore this new product and so TypeScript will belong here in our App series..!! Do you mind?? of course not..!! 😛