You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Contextual type for an array element doesn't filter out non-array union membersΒ #52588
The contextual type for array element is sourcing the information from the string indexer of the Record type. This makes the contextual type of this function to be ((arg: string) => void) | ((arg: number) => void). The contravariant position of arg makes its type reduce to never (since it's string & number) and prevents the expected contextual type to be provided.
π Expected behavior
I'd expect this contextual type to only be sourced from the Array member
Activity
jakebailey commentedon Mar 16, 2023
The fix has been reverted; per #53280 (comment)