Comment on Is a web browser using another scripting language feasible?
CameronDev@programming.dev 1 day agoI dunno, I don’t see the benefit to native TS in the browser. For compatibility, all sites will continue to serve JS, so what does TS gain anyone? And there is no performance benefit, maybe a performance hit given none of the type validation can happen until all of the scripts have downloaded, so execution can’t begin until that has happened?
I could be way off on this though, I’m not a webdev :/
jol@discuss.tchncs.de 23 hours ago
Type assertion in runtime would be really useful
CameronDev@programming.dev 21 hours ago
Can you even get runtime type assertions in TS? Isnt it all at compile time?
jol@discuss.tchncs.de 3 hours ago
That’s my point… You’d need native TS support for that
CameronDev@programming.dev 2 hours ago
I don’t think I understand. Native TS does the type checking at compile time right? Not run time? Or would the compile happen in the browser?