Mirror #9 in typescript
Update for latest versions of typescript
bump to 1.3.2