Say we have a function:
What will the type of the return value be? What if there is no colon in the provided string — then bar will be undefined. But typescript has the utmost confidence in the programmer, and is happy to infer that both foo and bar are strings:
This is dangerous! Here, we shall get an undefined is not a function:
Flow behaves the same, by the way.