← Back to context

Comment by antod

1 hour ago

Python containing type hints doesn't get transpiled the way typescript does. The transpiling rewrites the TS to varying degrees depending on the target and the extra TS features being used.

Python "just" (that word is doing a lot of work) updated the interpreter to ignore the type hints. It still runs the same way as code without hints.

There's a bit more going on with TS that you couldn't just have the runtime ignore the types.