As the post nicely demonstrates, TypeScript is definitely not OK for compilers (and not surprising at all!)

It doesn't even have destructuring pattern matching!

At this point, even Java is better [1].

[1] https://github.com/tomprimozic/caya/blob/master/src/caya/Int...

With how powerful the type system is you can implement pattern matching via a library pretty convincingly, https://github.com/gvergnaud/ts-pattern is definitely the go-to. That being said pattern matching is hardly a requirement for being ok for implementing compilers.