question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Distinguish types of calls for call hierarchy?

See original GitHub issue

For the call hierarchy, @rbuckton brought up that JavaScript and TypeScript has many different ways of actually invoking a function:

  • New new Foo()
  • Tagged templates: foo`bar`
  • Decorators @foo
  • Property/Element access to accessors obj.foo

My proposal is that TS should return call hierarchy items for all of these cases, but I wanted to check this with you @jrieken. Does that make sense? Should we consider having a way to distinguish different call types?

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
rbucktoncommented, Nov 8, 2019

Possibly, I’ll see what I can come up with.

1reaction
rbucktoncommented, Nov 7, 2019

I don’t have any specific use cases in mind, but I’ve seen similar features in other tools (such as Reflector) respect this kind of classification. For accessors especially, it can be useful to distinguish between call sites using the setter and call sites using the getter. Many hierarchy items will only have a single classification (classes can only be new-ed, most functions will only be called, etc.).

Read more comments on GitHub >

github_iconTop Results From Across the Web

What is the difference between call hierarchy and find ...
"Find references" shows you all direct callers of the selected method. "Call hierarchy" in contrast shows also the callers of those direct ...
Read more >
Find calls to a method - Visual Studio (Windows)
Learn how to use the Call Hierarchy window to navigate all calls to, and sometimes from, a selected method, property, or constructor.
Read more >
Source code hierarchy | IntelliJ IDEA Documentation
With IntelliJ IDEA, you can examine the hierarchy of classes, methods, and calls and explore the structure of source files.
Read more >
40.16.6 Call Hierarchy View
The Caller Hierarchy Strategy shows method calls of the selected function or task. Note: When calling a virtual method on a base class...
Read more >
One of my favorite features of Intellij-IDEA: Call Hierarchy
This test code will be shown in a different color so you can easily differentiate between test code and production code that calls...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found