Typescript port

The typescript port I mentioned the other day - now with a Gruntfile.
This is nice. We should probably do something like this in the other implementations sometime.