Skip to content

When relating object literal types to unions, avoid elaborating on Array/ReadonlyArray #25750

Closed
@DanielRosenwasser

Description

@DanielRosenwasser

From @arackaf:

image

Notice that when comparing an object literal against MutationSubscription | MutationSubscription[], it picked the last branch which is bad.

Kind of like #24776, but here if the type originates from an object literal (or from JSX attributes?), we should avoid matching against Array or ReadonlyArray

Metadata

Metadata

Labels

BugA bug in TypeScriptDomain: Error MessagesThe issue relates to error messagingFixedA PR has been merged for this issue

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions