Hacker News new | ask | show | jobs
by pphysch 665 days ago
The browser doesn't support TS though. The browser does support Python via PyScript/pyodide/etc.

You can't run TS in the browser unless you jump through the same hoops that PyScript is.

2 comments

Yet, type annotations are being discussed for JavaScript, eventually the browsers will be running Typescript.
I thought I read somewhere that the Chrome team tried typed JS, found out that there was a performance hit, and they ended the experiment? Is this a continuation of that or a new effort? Sounds interesting.
Maybe as part of the Flutter/Dart sales story?

Here is the current status of the standard proposal.

https://tc39.es/proposal-type-annotations/

The browsers are already running anything via custom WASM interpreters, like Pyodide for Python.
With a huge performance hit and leaky abstractions.
‘npx vite build’ is what you call hoops?
You can offline transpile anything to JS to later run in the browser, TS isn't special in this way.

With PyScript you can see and modify the actual code in your browser, just like vanilla JS.

Do you actually see and modify code in your browser today? I mean for like 5 years all you see in the browser is minified and obfuscated to the point its almost impossible to make any practical sense out of it.
Doesn't sound useful tho