Typescript port

The typescript port I mentioned the other day - now with a Gruntfile.
We should probably use [TypeScript properties](http://blogs.microsoft.co.il/gilf/2013/01/22/creating-properties-in-typescript/) instead of getters and setters (which are very Java-ish).