JS: Nicer jump-to-def for function declarations

This commit is contained in:
Asger F
2025-06-04 22:16:25 +02:00
parent 57fad7e6c9
commit 691fdb106e
2 changed files with 9 additions and 4 deletions

View File

@@ -183,6 +183,11 @@ private AstNode redirectOnce(AstNode node) {
result = cls.getIdentifier()
)
or
exists(FunctionDeclStmt decl |
node = decl and
result = decl.getIdentifier()
)
or
exists(MethodDeclaration member |
not member instanceof ConstructorDeclaration and
node = member.getBody() and