Skip to content

References codelens for every plain object property since TypeScript 3.7 #86495

Closed

Description

  • VSCode Version: 1.40.2 and 1.41.0-insider
  • OS Version: Windows 10 1909
  • TypeScript 3.7
  • This setting: "typescript.referencesCodeLens.enabled": true
  • Does this issue occur when all extensions are disabled?: Yes

Steps to Reproduce:

  1. Create a new .ts file.
  2. Create an object such as
class MyClass {
  private myMethod() {
    const myObject1 = {
      prop1: "prop1",
      prop2: {
        prop2_1: "prop2.1",
        prop2_2: "prop2.2"
      }
    };
  }
}

With TypeScript 3.6, we get codelens for the class and the method:
image

With TypeScript 3.7, we also get codelens for each property in the object:
image

Is it normal behavior?

It becomes pretty intense in a React Native screen file when we define styles like so:
image

or when we pass a plain object as a parameter to a method:
image

Also, the references found for each React Native styles are styles with the same name in other files, but in reality, those are not related since they are local to each file.

Activity

  1. added
    javascript
    on Dec 6, 2019
  2. added
    bug
    on Dec 10, 2019
  3. craxal commented on Dec 16, 2019

    @craxal

    Matt Bierner (@mjbvz) Why was this issue closed? Has it been resolved?

  4. mjbvz commented on Dec 16, 2019

    @mjbvz
    Contributor

    Craig Alvord (@craxal) Yes. Try the insiders builds (1.42)

  5. added
    candidate
    on Dec 18, 2019
  6. locked and limited conversation to collaborators on Feb 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugcandidatejavascriptverified

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions