Unless someone is using some language extensions, transpiling from TS to an ECMAScript module using the ESNext
target merely drops the type annotations.
If not running the exact same code being developed is an issue, it’s an easy fix.
Comment on Big projects are ditching TypeScript… wtf? - The Code Report
scorpionix@feddit.de 1 year agoThe issue with transpiling is that the code that’s running in production is not necessarily the one that’s been tested. A source map doesn’t fix that.
Unless someone is using some language extensions, transpiling from TS to an ECMAScript module using the ESNext
target merely drops the type annotations.
If not running the exact same code being developed is an issue, it’s an easy fix.
Ugh? Of course it is. Why shouldn’t it be?
Because Browsers can’t run Typescript, they run JavaScript. That’s why the intermediate conversion step isneededd.
But your tests are running on the compiled code too. Nothing can be tested but handwriting assembly, with such approach
atheken@programming.dev 1 year ago
I loathe this line of reasoning. It’s like saying “unless you wrote assembly, compiling your code could change what it does.”
Guess what, the CPU reorders/ellides assembly, too! You can’t trust anything!
pivot_root@lemmy.world 1 year ago
Haha, what is this, the 90s?
Assembled instructions aren’t even the lowest non-hardware stage in instruction execution. There’s proprietary microcode sitting a level below your typical x86 ISA.
atheken@programming.dev 1 year ago
🙈🙉🙊
I know, but I didn’t want to scare the children.
I also choose to pretend it’s just little gnomes moving the bytes around. Less magic.
pivot_root@lemmy.world 1 year ago
What are electrons, but a miserable pile of little magic gnomes? But enough talk… have a upvote!