TypeScript port done!