Skip to content

Property assignments in constructor should show up in intellisense #8846

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

Closed
sandersn opened this issue May 26, 2016 · 3 comments
Closed

Property assignments in constructor should show up in intellisense #8846

sandersn opened this issue May 26, 2016 · 3 comments
Labels
Committed The team has roadmapped this issue Suggestion An idea for TypeScript

Comments

@sandersn
Copy link
Member

If you request completion at the /**/ below...

class C {
  constructor() {
    this.x = 'foo';
  }
}
let c = new C();
c./**/;

Expected behavior:

Completion list should contain x.

Actual behavior:

Completion list does not contain x.

Currently there is an error at this.x = 'foo', "Property 'x' does not exist in 'C'". That error should stay.

@sandersn sandersn changed the title Property assignments Property assignments in constructor should show up in intellisense May 26, 2016
@sandersn sandersn added the Suggestion An idea for TypeScript label May 26, 2016
@DanielRosenwasser
Copy link
Member

Is this a JS language service bug? We explicitly said TypeScript shouldn't recognize this back in October.

#5196 (comment)

Though I wouldn't be opposed to changing it.

@mhegazy
Copy link
Contributor

mhegazy commented Jun 15, 2016

We should understand the property assignments but still give you an error. This way js and TS work the same way, and we can have better quick fix support.

@RyanCavanaugh RyanCavanaugh added the Committed The team has roadmapped this issue label Aug 9, 2018
@RyanCavanaugh
Copy link
Member

I think this is as fixed as it needs to be

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Committed The team has roadmapped this issue Suggestion An idea for TypeScript
Projects
None yet
Development

No branches or pull requests

4 participants