TypeScript: Fixes type through bug. (#754)