Podcast Summary: TypeScript with Jake Bailey
Podcast Title: Software Engineering Daily
Host: Josh Goldberg
Guest: Jake Bailey, Senior Software Engineer at Microsoft
Release Date: July 15, 2025
Introduction to Jake Bailey and TypeScript
In this episode of Software Engineering Daily, Josh Goldberg welcomes Jake Bailey, a Senior Software Engineer at Microsoft who has significantly contributed to the TypeScript compiler. Jake discusses his journey into programming, his role at Microsoft, and his deep involvement with TypeScript tooling.
Jake Bailey [01:37]: "According to Git Blame, I wrote the TypeScript compiler, which is not true. But it is true if you don't bother to ignore all the migrations I made."
Journey into Programming and Microsoft
Jake shares his early experiences with programming, starting from elementary school with TI BASIC. His passion led him to explore languages like C in middle school and eventually pursue a degree in computer science at the University of Illinois. Jake recounts his initial role at Microsoft, which was unrelated to TypeScript, focusing instead on Site Reliability Engineering (SRE).
Jake Bailey [04:00]: "I was in the middle of my grad degree and I was taking so many programming language classes and I was just, I was like, this is awesome."
Transition to TypeScript
Initially slated to work on the C compiler, Jake was redirected to Python-related projects due to a misclassification of his role. After contributing to Python language server projects like Pylance and Pyrite, he transitioned to the TypeScript team, where he began addressing critical compiler bugs and spearheading major migrations.
Jake Bailey [05:56]: "Ryan, our engineering manager, he assigned me a bunch of bugs. This is pretty common when people join the team, is that he'll sign them a bunch of bugs that are sort of like, get you started."
Migrating TypeScript from CommonJS to ESM
One of Jake's significant contributions was migrating the TypeScript codebase from CommonJS (CJS) to ECMAScript Modules (ESM). He explains the complexities involved in this migration and the performance benefits it yielded.
Jake Bailey [13:32]: "The headlining thing was that the whole thing got 30 to 40% faster... Because of those namespaces, everything was inside of an object."
Benefits of the Migration
The transition to ESM resulted in substantial performance improvements. TypeScript's compile times decreased dramatically, and tooling integration became more efficient.
Jake Bailey [15:32]: "Instead of running a full 30-second compile... we could run esBuild. And that took like 100 milliseconds."
Strategies for Large-Scale Code Migrations
Josh inquires about strategies for migrating large codebases, to which Jake emphasizes the importance of automation and incremental transformations using tools like TSMorph.
Jake Bailey [10:42]: "The most important thing is to try and write tooling to do it, because if you don't, you're going to have a really hard time."
Enhancing TypeScript with Project References
Jake delves into TypeScript project references, explaining how they allow splitting a codebase into manageable projects, thereby improving build times and editor performance.
Jake Bailey [20:33]: "Project references were added to TypeScript, where you can split your application up into different blocks that define like, okay, here is the front end, which depends on the common bit."
Porting TypeScript Compiler to Go for Performance Gains
A major highlight of the discussion is Jake's project to port the TypeScript compiler from TypeScript to Go, achieving a tenfold increase in performance. He details the challenges faced during this transition and the impressive results obtained.
Jake Bailey [25:44]: "We published... the entire checker ported. A lot of emit ported, obviously parsing and binding is ported... it's 10 times faster than just running TSC straight up."
Reasons for Choosing Go Over Rust or C
Jake explains why Go was chosen over Rust or C for the port, citing the language's concurrency model and ease of one-to-one porting without altering the compiler's behavior.
Jake Bailey [31:50]: "TypeScript is a language without like a raw, like a specific specification of like, how it works. And so if we don't take this code and we don't port it one to one, it will behave differently and then some project will break."
Addressing Common TypeScript Performance Issues
The conversation touches upon common performance pitfalls in TypeScript projects, such as misconfigured tsconfig files and excessive use of project references, and how to mitigate these issues.
Jake Bailey [22:58]: "There's people out there who have real type of performance problems... 'I accidentally didn't configure the types property of my tsconfig and therefore it tried to load 1000 at types packages.'"
Future Directions and Implications
Looking ahead, Jake discusses the potential advancements enabled by the enhanced performance of the TypeScript compiler, including integrating it into WebAssembly (WASM) for browser environments and accommodating increased feature demands from the developer community.
Jake Bailey [43:39]: "We have lots of plans on the horizon of getting it into WASM because it's important for the browser."
Light-Hearted Moments: Weird Al Yankovic
In a lighter segment, Josh asks Jake about his favorite "Weird Al" Yankovic song, leading to a humorous exchange about memory and musical preferences.
Jake Bailey [45:24]: "I don't know if I can explain that. It's so long. It's got lots of lyrics you have to memorize. It's just a good one."
Closing Remarks and Resources
Jake wraps up by providing resources for listeners to learn more about his work and TypeScript contributions.
Jake Bailey [46:30]: "Jakebailey.dev. That's the main thing. It links to everything else."
Key Takeaways
-
Automation is Crucial: Large-scale migrations, such as moving from CommonJS to ESM, benefit immensely from automated tooling to handle the complexities involved.
-
Performance Enhancements: Porting the TypeScript compiler to Go has resulted in significant performance gains, enabling faster compile times and improved developer workflows.
-
Effective Project Management: Utilizing TypeScript project references can optimize build processes and editor performance, but requires careful configuration to avoid performance bottlenecks.
-
Future Innovations: The ongoing improvements to TypeScript's performance open doors for further enhancements, including integration with WebAssembly and meeting the growing demands of the developer community.
-
Community and Open Source: Jake's work exemplifies the collaborative spirit of the open-source community, underscoring the importance of public contributions and shared knowledge.
For more insights and updates on Jake Bailey's work with TypeScript, visit jakebailey.dev.
