Got tired of tsc taking forever to type check my code so I made a Typescript type checker in Rust for fun For a small Typescript file it's 500x faster than tsc taking ~0.002s vs ~1.3s (using SWC for compilation). It supports only a small subset of Typescript (for now).
48
225
2K
0
152
Download Image
It's using SWC to parse Typescript, then it type checks the returned AST. Right now it supports a subset of TS's type system with the end goal of reaching feature parity with Typescript and possibly making an LSP server that goes brrr
This is the sample.ts, basically everything is supported except for complex types (generics, conditionals, recursive) right now
@zack_overflow would be funny to go the @rust_analyzer route and try to use chalk to satisfy the types