Skip to content

No suggestion diagnostic for unchecked JS files in method from class #45479

Closed
@DanielRosenwasser

Description

@DanielRosenwasser
class Person {
    getFavoriteColor() {

    }
}

const person = new Person();
person.getFavoriteColour();

Expected

A suggestion diagnostic:

Property 'getFavoriteColour' may not exist on type 'Person'. Did you mean 'getFavoriteColor'?

Actual

No suggestion diagnostic.

In contrast, see this example:

const person = {
    getFavoriteColor() {

    }
}

person.getFavoriteColour();

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptDomain: JavaScriptThe issue relates to JavaScript specificallyFix AvailableA PR has been opened for this issueRescheduledThis issue was previously scheduled to an earlier milestonecheckJsRelates to checking JavaScript using TypeScript

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions