Company
Date Published
Author
Priscila Oliveira
Word count
2322
Language
English
Hacker News points
None

Summary

Sentry recently converted its entire frontend React codebase from JavaScript to TypeScript, completing an 18-month journey spanning over a dozen team members, 1,100 files, and 95,000 lines of code. The company's initial motivation was to improve the developer experience through static analysis and type checking, which they believed would help prevent bugs. They also saw benefits in reducing API documentation needs, improving editor integrations, and having access to a large community with rapid releases. However, the conversion process faced several challenges, including interoperability issues between TypeScript and React, incorrect library types, and sustaining motivation throughout the project. Despite these obstacles, Sentry was able to successfully migrate its frontend codebase, resulting in improved protection against bugs, increased productivity, and greater confidence in shipping code. The company emphasizes the importance of incremental conversion, staying current with TypeScript releases, and gradually building complex types. They also highlight the value of using TODO comments to track future work and are now considering introducing end-to-end type safety.