2 ms·
Typescript gets compiled to Javascript anyway. What's stopping any pattern matching construct from being compiled to vanilla JS? We already get stuff like type
by sn9 4y ago
Typescript gets compiled to Javascript anyway. What's stopping any pattern matching construct from being compiled to vanilla JS?
We already get stuff like type narrowing and generics.
- pjmlp 4y agoThe philosophy of not adding language constructs beyond what is required for the type system. Typescript code without type annotations should be JavaScript compatible, minus features still in flight for standardisation. There are other languages for that like ReasonML.