TypeScript icon indicating copy to clipboard operation
TypeScript copied to clipboard

Find all references on a Typescript class constructor returns no results.

Open egamma opened this issue 10 years ago • 6 comments

From @jockjocko on April 12, 2016 9:39

  • VSCode Version: 0.10.15-insider
  • OS Version: Windows 10

Steps to Reproduce:

  1. Create class and constructor.
  2. Create a new instance of the newly created class
  3. Shift + f12 or right click find all references

I would expect it to find all references of the class being constructed "new ExampleClass()".

Copied from original issue: Microsoft/vscode#5185

egamma avatar Apr 12 '16 13:04 egamma

Moving to TypeScript for investigation.

egamma avatar Apr 12 '16 13:04 egamma

@jockjocko can you please provide a code sample that demonstrates the problem? Thanks!

RyanCavanaugh avatar Apr 12 '16 17:04 RyanCavanaugh

Find all references on a Typescript class constructor

I think he is trying it here:

class Foo {
    constructor/* <= here */(){}
}
const foo = new Foo();

Indeed I get zero results :rose:

Note : References on the class name Foo work just fine :heart:

basarat avatar Apr 13 '16 05:04 basarat

If so, then it's a duplicate of #2114.

DanielRosenwasser avatar Apr 13 '16 05:04 DanielRosenwasser

I'm assuming that's what's going on. Please comment if that's not the case and we'll re-open. Thanks!

RyanCavanaugh avatar Apr 13 '16 17:04 RyanCavanaugh

Yes this is the same as #2114, thanks for the info.

jockjocko avatar Apr 13 '16 18:04 jockjocko