Consider the following union type:
type T = {} | ({ some: number } & { any: string })
If you want to narrow this type to the latter, simply excluding the empty object won't work:
type WithEntries = Exclude<T, {}>
This will result in never
.
Is there a different approach to achieve this narrowing?