If you want to compile to a binary for ease of distribution, then you can do it with both TypeScript and Python (you just get an interpreter embedded in the binary), although in both cases you'll need to use a 3rd party tool to achieve this. If you want it for the performance then neither are good options, although JS/TS is significantly faster than Python.
I indeed explore this solution for python, but it doesn't look mature yet. I will have a look at the TS/JS solution, thanks !