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

CodeLens References Missing on TypeScript class constructors after 1.66.1 update #147154

Closed
ftlPhysicsGuy opened this issue Apr 9, 2022 · 0 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug insiders-released Patch has been released in VS Code Insiders typescript Typescript support issues verified Verification succeeded
Milestone

Comments

@ftlPhysicsGuy
Copy link

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: 1.66.1
  • OS Version: MacOS 12.2.1

Steps to Reproduce:

  1. Create a new TypeScript file and add a class (exported or not) with a constructor
  2. Create code in TypeScript that constructs an instance of the created class
  3. Note that in the Editor, the constructor shows no reference count above it (at least on my machine)
  4. Expected behavior: CodeLens should include a reference count about the constructor and allow the user to access the related references

More info:

Prior to installing the latest update to VSCode, CodeLens on my code indicated how many times a class was constructed via reference counts above each constructor. Now those counts are missing.

Here's specifically how I tested this issue: In a new VSCode window with all extensions disabled, I opened an empty folder and added a TypeScript file with the following code:

export class TestClass {
    public constructor(
        public readonly info="My constructor has no CodeLens Reference Count!"){
    }
    public testMethod(): string {
        return "This method has a CodeLens Reference Count"
    }
}

export class TestClass2 {
    public constructor(
        public readonly testClass = new TestClass()
    ) {
    }
    public testMethod2(): string {
        return this.testClass.testMethod();
    }
}

Here is an image showing what I see in my VSCode as a result of adding that code:

Screen Shot 2022-04-09 at 1 31 46 PM

Perhaps a setting got added or changed via the update, but I cannot determine how to get back the references above my constructors.

Thanks.

@mjbvz mjbvz added this to the April 2022 milestone Apr 13, 2022
@mjbvz mjbvz added bug Issue identified by VS Code Team member as probable bug typescript Typescript support issues labels Apr 13, 2022
@mjbvz mjbvz closed this as completed in 977c9c9 Apr 13, 2022
@lramos15 lramos15 added verified Verification succeeded and removed verified Verification succeeded labels Apr 27, 2022
@jrieken jrieken added the verified Verification succeeded label Apr 28, 2022
@github-actions github-actions bot locked and limited conversation to collaborators May 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug insiders-released Patch has been released in VS Code Insiders typescript Typescript support issues verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

5 participants
@jrieken @lramos15 @ftlPhysicsGuy @mjbvz and others