Actually I really wish there was an option similar to typescript for Python. There are promising things.. but the annotations, for example, are just not there yet
I'm very satisfied with the new typing [0][1] module. It's part of the standard library since Python 3.5 and it provides type annotations similar to those of Typescript. It's still missing some features (IMO), but it's also under active development, so I guess more useful features will come.
from typing import List
Vector = List[float]
def scale(scalar: float, vector: Vector) -> Vector:
return [scalar * num for num in vector]
def greeting(name: str) -> str:
return 'Hello ' + name