Skip to content

JavaScript Class Prototype Assignment not Recognized for IntelliSense #15163

@mjbvz

Description

@mjbvz

From http://stackoverflow.com/questions/43354977/how-can-i-make-intellisense-reference-a-js-file-in-another-folder

TypeScript Version: 2.2.2

Code

/**
 * @class
 */
function MyClass() { this.xyz = 1; }
MyClass.prototype = { abc: 2 };

const x = new MyClass()

Expected behavior:
Suggestions on x know about the property xyz from the class itself, and abc from the prototype

Actual behavior:
Only a suggestion for xyz is shown

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptFixedA PR has been merged for this issueVS Code TrackedThere is a VS Code equivalent to this issue

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions