add possibly suggestions of class after "instanceof" (typescript)

Webstorm doesnt suggest me right class after instanceof operator

4 comments

Please can you elaborate on this? What suggestions would you expect to see? Code snippets would be helpful

0

what about start with that class to which that instance really belongs or could belongs?

method(instanceVariable: InstanceClass1 | InstanceClass2): void {
if (instanceVariable instanceof InstanceClass1) {} //it doesnt suggest possible classes, nor i have defined in parameter area of method or not
}

 

0

Would you expect to see InstanceClass1 and InstanceClass2 when hitting Ctrl+Space after if (instanceVariable instanceof ?
Please feel free to file a request for this feature to youtrack, https://youtrack.jetbrains.com/issues/WEB

0

yes

and in general maybe a class in which was created that instance

0

Please sign in to leave a comment.