Typescript Get Type From Function Python Definition