[BLOCK QUOTE].
I'm not saying that a type cannot have additional properties (I said the exact opposite [here]([URL] myself). I'm saying the compiler is correct when handling `f` as `Foo` due to `Foo[]` "not have" `'bar'` because it already is the expected behaviour. The compiler is optimistic and handles as _exact types_ with respect to the `in` operator. This is enough for the vast majority of cases if you use good programming practices. I never had any problems using `in` to determine the type, neither in my personal projects nor in my work.
This was explained here: [URL]
[BLOCK QUOTE].
Yes, it is a duplicate and, even if it wasn't, the issue is incoherent and must be closed