finished migrating to typescript