Python Type Inference Typescript Interview