Distinguish types of calls for call hierarchy?
See original GitHub issueFor 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:
- Created 4 years ago
- Comments:6 (6 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Possibly, I’ll see what I can come up with.
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.).