Typescript port

The typescript port I mentioned the other day - now with a Gruntfile.