For example, in React there is this type that's a union of an array, single object or null. Some kind of catch-all, I guess. So, when you see one of these things, there's no way to know what you have unless you do something ugly like this:
if ((value as any).length) {
// it's an array
} else if (value) {
// must be a single object, I guess..
} else {
// null
}
The thought of littering my code with these kinds of type checks makes me feel really dirty, unless I'm totally missing something...