Home / Companies / Mergify / Blog / Post Details
Content Deep Dive

The Native TypeScript Compiler Cut Our Typecheck From 13s to 3.5s. The Only Hard Part Was ESLint.

Blog post from Mergify

Post Details
Company
Date Published
Author
-
Word Count
1,295
Company Posts That Month
8
Language
English
Hacker News Points
-
Post removed?
No
Summary

The migration to TypeScript 7's native Go compiler significantly reduced typechecking time from 13 seconds to 3.5 seconds for a React application with over 244,000 lines of TypeScript, primarily by leveraging parallel processing with a higher core usage. The change required minimal code alterations, as the compiler was almost a drop-in replacement, but maintaining typescript-eslint functionality posed a challenge since TypeScript 7.0 does not include an importable compiler API. This was resolved by installing both the classic and native compilers under different package names, allowing the editor to use the classic API while the native binary handled CI and local typechecks. The migration revealed stricter typechecking by the native compiler, identifying a few errors previously unnoticed, but they were easily addressed. The decision to adopt TypeScript 7 was delayed until it was well-vetted, and while the transition improved typechecking speed, it is recommended to wait for TypeScript 7.1 for those who rely heavily on typescript-eslint in CI environments due to its restored compiler API.

Trends Found in this Post

No tracked trend matches for this post yet.

Use This Data

Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.