typescript

AngularJS + TypeScript Tip - Controller ViewModel

In my previous post on getting started with AngularJS and TypeScript, I went over some of the gotchas that took me awhile to work through such as minification and scope inheritance. Today I want to look at a tip to help ease the pain you might encounter when trying to…

TypeScript Generics

About a month ago, Microsoft released the 0.9 version of TypeScript. Originally released in October 2012, the language has come a long way and one of its most requested and recent additions is generics. You may find yourself asking, "When the heck am I going to use generics in…

AngularJS and TypeScript

Lately, I’ve started using AngularJS instead of Knockout. Knockout.js is very popular in the .NET world, is very easy to use, and meshes well with .NET devs used to the MVVM style of development. I highly recommend it. But, yeah, it’s fair to say that I’m…

TypeScript and Knockout: Define Computed Observables

ko.computed() in TypeScript On my second day of figuring out how to use knockout.js and TypeScript, I came upon computed observables and ran into trouble. As a point of reference, this is a simplified version of how I declared my ViewModel in pure JavaScript: var SampleViewModel = function () { var…

TypeScript not Rebuilding JavaScript File

UPDATE: While the solution I presented is fine for builds, what you really want is for the JavaScript file to be regenerated when you save the TypeScript file. The current TypeScript plug-in doesn't do this. Lucky for us, Mads Kristensen has updated the Web Essentials 2012 plug-in to support TypeScript.…