Skip to content

Destructuring on this does not include suggestions for private properties #34405

Closed
@mjbvz

Description

@mjbvz

From microsoft/vscode#82476

TypeScript Version: 3.7.x-dev.20190114

Search Terms:

  • completions / suggestions
  • destructure
  • completionInfo

Code

For the TS:

class Foo {
  public pub: string;
  private priv: string;

  method() {
    const {  } = this;
  }
}

Trigger completions inside the { } in const { } = this;

Expected behavior:
Suggestions for both pub and priv are returned

Actual behavior:
Only a suggestion for pub is returned

Playground Link:

Related Issues:

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptFix AvailableA PR has been opened for this issue

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions