Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TSServer: Extra underscores in properties #11902

Closed
ghost opened this issue Oct 27, 2016 · 1 comment
Closed

TSServer: Extra underscores in properties #11902

ghost opened this issue Oct 27, 2016 · 1 comment
Labels
Bug A bug in TypeScript

Comments

@ghost
Copy link

ghost commented Oct 27, 2016

TypeScript Version: nightly (2.1.0-dev.20161026)

Continuing to use ES5-style constructors found another bug - property name will contain extra underscore if it starts with 2 underscores, i'm sure it is related to language service.

Code

function MyObject(){
    this.__property = 1;
}
var instance = new MyObject();

Expected behavior:

Listing __property with two underscores, when using completion menu appears for instance.

Actual behavior:

2-or8

Notes

  • Appears only when property declared using this inside constructor. Prototype properties defined through prototype property and properties defined inside object literal come up fine.
  • Symbol for this.<property> doesn't have 'name' attribute in declaration, but in the case of prototype.<property> it is here.
@weswigham
Copy link
Member

This should be fixed by #16915.

@mhegazy mhegazy removed this from the Future milestone Apr 26, 2018
@microsoft microsoft locked and limited conversation to collaborators Jul 31, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug A bug in TypeScript
Projects
None yet
Development

No branches or pull requests

2 participants