Skip to content

"Did you forget to call 'X'?" for assignability errors #25308

Closed
@DanielRosenwasser

Description

@DanielRosenwasser

Discussed at #25306

We noticed a relatively high-occurring instance of an error:

Type X is not assignable to type () => X.
Type () => X is not assignable to type X.

Similarly, you can find users reporting issues on

Type Date is not assignable to type DateConstructor.
Type DateConstructor is not assignable to type Date.

We should see if the user forgot to call (or construct) one of the respective types if we can pull apart the context.

Metadata

Metadata

Assignees

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