I was able to actually implement and submit the app to the store in 3 days (granted, the app is simple, it has the same feature set as the Web version). You can download GiftMe for Windows 8.1 here:
You can also find the GiftMe client app source code here:
GiftMe will allow you to sign in exclusively with Facebook and collect information about your friends to provide you with customized gift suggestions for those friends. The client application calls the web service to search for friends, and get gift suggestions for them.
This post is primarily about my experience using TypeScript and not too much about my experience specifically with Windows 8.1 WinJS/HTML5 app development (that'll come in a later post).
-Awesome VS Intellisense Integration
-Very easy language to pick up
-No Typescript debugging in Visual Studio
-Getting setup with VS was quirky
Very easy language to pick up
Coming from C# there are some minor differences, such as typenames coming after variables but these are really easy to pick up. The above example explicitly defines a class with a member variable, constructor and instance method with defined typed parameters. Doing this in pure JS is really sort of awkward in my opinion.
You can also create interfaces (for example, for a particular JSON object):
Typescript interfaces are almost the same as traditional interfaces in strongly typed languages except one cool thing you can do is use it to define JSON objects. I found this pretty handy and actually didn't end up implementing any of the interfaces you see above explicitly.
Awesome VS Intellisense Integration
Extending from the previous point intellisense is much better when you have types:
This is the 'bread and butter' feature of Typescript. Coming from .NET development, it always makes me feel uneasy calling api's where all the parameters are just 'var'. How do I know I'm passing the right thing? This really solves that problem.
Here's an example of calling one of the GiftMe client library apis passing a callback with the Typescript lambda expression.
No TypeScript debugging in Visual Studio!!!
I gotta say, I was really disappointed when I realized the Typescript sdk didn't let you debug in Typescript.
In this case I pulled the definatley typed library for WinJS from the official codeplex repository here. Even with what appeared to be the latest file, Visual Studio still reported errors like the one above. You can check the MSDN docs, this api does exist. The code also runs just fine.
Unfortunately this was very prevalent in my entire solution:
Getting setup was Quirky
Overall I would say the VS2013 integration experience isn't as stellar as I would have liked it to be.
So... should you use TypeScript?
Although GiftMe is a very small application, it does bring about some obvious advantages and some of the current kinks to Typescript. In general I would say you should definitely consider Typescript if:
-You use Visual Studio for your JS development AND
-You have a large rather complicated application where code maintenance costs are high. (Think about how much bug fixes cost)
Hope this helps!