Contributor
Junyao Chen

Migrating Zulip's JavaScript Codebase to TypeScript


Mentors
Priyank Patel, jainkuniya
Organization
Zulip
Technologies
javascript, typescript
Topics
javascript, frontend, Typing, Web App, TypeScript, software architecture
This project focuses on migrating JavaScript codebase to Typescript. Zulip is in the process of porting the main web app JavaScript codebase to TypeScrip. Zulip’s 8% of lines have been migrated while the goal for this summer will be to get that to ~75%. The challenges for migrating JS to TS include circular imports, a large number of interdependent modules, tracking down complex cycles, multiple cycles in one module, order of conversion, and understanding types and their relationships. The proposed solutions include classifying circular imports, passing callback workaround, extracting common functionality into a third module, and writing unit and integration tests to ensure the migrated codebase functions properly.