Skip to content

Terrible error message for calling/constructing types #32013

Closed
@DanielRosenwasser

Description

@DanielRosenwasser

https://twitter.com/sebmck/status/1141776682275049472

image

Suggestions

This expression is not callable.
  Type '{0}' has no call signatures.

For unions:

This expression is not callable.
  No constituent of type '{0}' is callable.
This expression is not callable.
  Not all constituents of type '{0}' are callable.
    Type '{0}' has no call signatures.
This expression is not callable.
  Each member of the union type '{0}' has signatures, but none of those signatures are compatible with each other.

The same would be done for constructors.

This expression is not constructable.
  Type '{0}' has no construct signatures.
This expression is not constructable.
  No constituent of type '{0}' is constructable.
This expression is not constructable.
  Not all constituents of type '{0}' are constructable.
    Type '{0}' has no construct signatures.
This expression is not constructable.
  Each member of the union type '{0}' has signatures, but none of those signatures are compatible with each other.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Domain: Error MessagesThe issue relates to error messagingExperience EnhancementNoncontroversial enhancementsFixedA PR has been merged for this issueGood First IssueWell scoped, documented and has the green lightHelp WantedYou can do this

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions