Skip to content

Check if element types of Promises contain a property when issuing a missing property error #22923

Closed
@DanielRosenwasser

Description

@DanielRosenwasser
function f(x: Promise<string>) {
  x.toLowerCase()
}

Expected: Property 'toLowerCase' does not exist on type 'Promise<string>'. Did you forget to await the 'Promise<string>'?

Actual: Property 'toLowerCase' does not exist on type 'Promise<string>'.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Domain: Error MessagesThe issue relates to error messagingFixedA PR has been merged for this issueGood First IssueWell scoped, documented and has the green lightHelp WantedYou can do thisSuggestionAn idea for TypeScript

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions