You can't run TS in the browser unless you jump through the same hoops that PyScript is.
With PyScript you can see and modify the actual code in your browser, just like vanilla JS.
Here is the current status of the standard proposal.
So yes, its categorically better.
It is weird to me you cannot think of uses for types and handling their errors at runtime. Look at projects like FastAPI (which uses pydantic) for an an example where having types at runtime has been handy.
Also, if types are enforced at runtime logging is better, debugging is better, and you have more options for data validation and doing dynamic or metaprogramming likely more easily because you can evaluate these things at runtime. By types being built in, the language gives you a richer set of tools to work with and more options when and how to enforce types.
What is it, they have nice error messages? I don't expect them to fix code at runtime when type error happens.
> Also, if types are enforced at runtime logging is better, debugging is better
These can't even happen with type checking in the first place.
> you have more options for data validation
In my experience serializing/deserializing data is pretty much the only place where its useful, and it doesn't have to be built-in on a language level, Pydantic is doing it well enough.
> doing dynamic or metaprogramming likely more easily
This is where you lose me, I have never seen it being useful in reasonable large projects in popular languages. Dynamic or metaprogramming only works in a very specific category of languages (lisp-likes), doing it in any other language will become a problem sooner or later.
> more options when and how to enforce types
Again its only on serialization level, apart from that type checking will cover everything before runtime, it's weird to me how you can think that encountering problem later has any advantage of doing it earlier.
FastAPI validate both data (serialization) and schemas (used to create APIs and specs). Pydantic can also help with safe casting, not sure if FastApi uses that or not, but it is available
> These can't even happen with type checking in the first place.
I mean when you're debugging any problem or learning an API. It is nice to have rich types built in, especially while in a REPL, where you can inspect types.
> In my experience serializing/deserializing data is pretty much the only place where its useful, and it doesn't have to be built-in on a language level, Pydantic is doing it well enough.
Pydantic relies on Python having types built into the language and available at runtime.
Browser -> Wasm Running Python Interpreter -> Interpreting Python -> Rendering HTML if there is output.
Look how complicate it had become.