After switching type checking and linting to the Rust tool tsrs, CI type checking dropped from several minutes to about 10 seconds(zenn.dev)
Writing language: KoreanRead in the original language
Plain summary
- tsrs is a tool that ports the TypeScript error checker (tsc) to Rust. The development team at the Japanese startup DRESS CODE applied it to both type-aware linting in the code linting tool oxlint and to type checking.
- The median CI (checks that run automatically when code is pushed) type checking time measured by the team went from 229 seconds to 11 seconds for the backend and from 112 seconds to 14 seconds for the frontend. The team said the frontend figure is for reference only because there have been just 4 runs since the switch.
- The results matched the previous tools. All 97 frontend lint findings matched, and the 4 backend type errors matched down to their locations. However, under TypeScript 7.1, 1 places in anonymous class code became new errors (TS2674) and had to be fixed.
- tsrs is still in beta. The team first ran it side by side as a non-required CI job to compare results before switching, and it continues to use the existing TypeScript for builds and editor features. If problems arise, they can recover by reverting the PR.
Found on
Zenn ↗ / Published by source
Have you run into something like this? Tell us in a line or two what you did. You do not need to know the product.