Re:I'm making a Typescript type-checker in Rust
by hurflmurfl on Saturday January 22, 2022 @04:15AM
(#30035056)
I suppose picking top X open source Typescript codebases and compiling them with the expectation of output being identical with TSC would be one way to test this, albeit not what one would expect as a test suite.
Re:I'm making a Typescript type-checker in Rust
by 8n4vidtmkvmk on Saturday January 22, 2022 @04:23AM
(#30035088)
they can. thats exactly what the swc guy is doing. reusing the tsc tests
Other commenters have rightly called out the complexity of the type system as the reason why this is difficult. The other reason is that Typescript does not have a formal specification. The tsc compiler is the only reference for the correct behaviour. It would be great if the official compiler and these reimplementations could share a common test suite to ensure compatibility.