It’s a bit awkward, you have a transpile the script, and generate source maps to debug it, but hey, that’s life in a browser.
So if you’re not stuck in a browser, and can run any language you want, why in the world would you do all that?
It’s a bit awkward, you have a transpile the script, and generate source maps to debug it, but hey, that’s life in a browser.
So if you’re not stuck in a browser, and can run any language you want, why in the world would you do all that?
[0] https://blog.codinghorror.com/the-principle-of-least-power/
tl;dr A creator of node.js and others have made a new runtime and ecosystem [1] (via rust) for EcmaScript that also bundles a Typescript transpiler. Rather than utilize npm, deno dependency files call out specific uris, rather than an abstract package and assuming it is on a central server. In service of letting a user choose the sandbox boundary, the interpreter requires disabling security features (ex file IO) via the run args or a config file.
Learning another language does require effort, but the increasingly circuitous machinations being invented to continue using browser scripting technologies outside the browser are starting to seem like even more effort.
Plus, those efforts yield skills that only apply within the contrivance. A second language would apply more broadly, and probably be more edifying.