3 ms·
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 sa
by pphysch 2y 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.
- wiseowise 2y ago‘npx vite build’ is what you call hoops?
- pphysch 2y agoYou 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.
- pjmlp 2y agoYet, type annotations are being discussed for JavaScript, eventually the browsers will be running Typescript.
- pphysch 2y agoThe browsers are already running anything via custom WASM interpreters, like Pyodide for Python.
- pjmlp 2y agoWith a huge performance hit and leaky abstractions.
- infamia 2y agoI 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.
- pjmlp 2y agoMaybe as part of the Flutter/Dart sales story? Here is the current status of the standard proposal. https://tc39.es/proposal-type-annotations/ https://tc39.es/proposal-type-annotations/