3 ms·
It's not a different language as in "it's a different language". It's just types added. The actual executable code is pure Javascript. The type annotations have
by nosianu 4y ago
It's not a different language as in "it's a different language". It's just types added. The actual executable code is pure Javascript. The type annotations have ZERO influence on what is executed, they are completely and used during development.
To call this "another language" as if it was C vs. Python does not make any sense, unless your main goal is to win some Internet argument no matter what.
- krapp 4y agoYes, the language that Typescript emits is Javascript. I can write Python code that emits Javascript, but that doesn't make Python, itself, Javascript. Languages can be structurally or idiomatically similar but still not be the same language. And there are more differences between Javascript and Typescript than just the type annotations (although that, alone, would be sufficient.) Typescript has generics, ffs.