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).
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
@zack_overflow Hpw much does it handle? There are super tricky stuffs in typescript
@zack_overflow SWC Is also implementing the same, Maybe you folks should team up 😉
@zack_overflow rust taking over webdev tooling and I'm all here for it <3
@zack_overflow Brilliant Zack! Been waiting for a faster typechecker. 🥲 @kdy1dev is busy with swc and nextjs but still working on the rust typechecker. It is commercial though, the last time I checked.
@zack_overflow @jarredsumner can you have Zack officially work on this pleaase
@zack_overflow i’ve been working on the other side of things, the bundling and emitting ESM part (using esbuild) currently no typecheck, just run tsc manually, but would fold this in when it ships. i would just test it against the TypeScript source code itself, you will get near 100% coverage
@zack_overflow Everybody gansta until the type system is turing complete 😂
@zack_overflow Am I the only one more pumped for such nicely formatted error messages? Any way to get this sort of error messages right now in VSCode?
@zack_overflow Is the code available or are you planning to make it available soon? Also, a more accurate comparison at this stage might be to load everything in memory and then compare the actual type checking speed using the compiler API. tsc has a lot of features and higher startup cost.
@zack_overflow Uh so I'm not the only one embarrassed by the TSC speed 👀
@zack_overflow This is a huge unfilled hole in the community, if you can achieve it you will have tons of backing, job offers and more cc @nextjs @deno_land @angular and many more
@zack_overflow Impressive man! Are you gonna open source it?
@zack_overflow oooh are you using miette for error reporting 👀
@zack_overflow @deno_land has also been working on something like this: github.com/denoland/deno/…