Comment on Is a web browser using another scripting language feasible?
CameronDev@programming.dev 1 month agoCan you even get runtime type assertions in TS? Isnt it all at compile time?
Comment on Is a web browser using another scripting language feasible?
CameronDev@programming.dev 1 month agoCan you even get runtime type assertions in TS? Isnt it all at compile time?
jol@discuss.tchncs.de 1 month ago
That’s my point… You’d need native TS support for that
CameronDev@programming.dev 1 month 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?
jol@discuss.tchncs.de 1 month ago
Browser-native TS would run directly on the browser without compiling.
CameronDev@programming.dev 1 month ago
At least in the node.js native TS implementation, they strip the types and don’t do checks, so you don’t get runtime type checks:
nodejs.org/learn/typescript/run-natively
I think, but I’m no expert, but in order to have type checking you need to have some kind of compilation check? You cant just start interpreting and hope to work things out on the fly?