Rewriting it in rust would remove that important aspect c
But, while I’m sure it was really important initially, there are now very many test cases and early-adopters to help prevent regressions.
And they still have that large TypeScript codebase to test their new tool on — it wouldn’t vanish.
Sorry, my previous comment wasn't very clear. Of course, faster languages produce faster results. But the language alone isn't enough in this case.
It takes three steps. Steps 1 and 3 are parellisable, and 2 should be very quick:
1. Convert every file in the repository to an AST, and perform static reflection on that AST.
2. Calcuate the inheritance graph for all the functions, classes etc. you've collected
3. Analyse every file, using the pre-calculated list of functions and classes available in each case.
It sounds like you could easily have a nice consulting gig for Microsoft.
I realise this is sort of a dead horse, but rewriting the Typescript checker in Rust would not be an impossible task for a team as well-resourced as Microsoft’s.
I know, because I rewrote a different 100KLOC typechecker myself in Rust (making a few small adjustments for a slightly different target language). It took me about a year.
It would speed up the TypeScript typechecker at least 3-5x, which would save a lot of programmer time (and also datacenter energy consumption).
There’s one obvious downside — it raises the bar for outside contributions — but given the expertise necessary to contribute usefully to a static analysis tool in the first place, and to contribute to TypeScript in particular, I’m not sure it’s a big additional impediment.