I have a fairly simple case where Typescript doesn\'t infer the types. I\'d like to know why Typescript behaves this way.