Navigation bar items in methods#7177
Conversation
| else { | ||
| const grandParentKind = functionDeclaration.parent.parent.kind; | ||
| if (grandParentKind === SyntaxKind.MethodDeclaration || | ||
| grandParentKind === SyntaxKind.Constructor) { |
There was a problem hiding this comment.
When won't isFunctionBlock cover these cases?
There was a problem hiding this comment.
My assumption is never, it covers them and more function like nodes. That's why in the else clause I need to filter out only method declarations and constructors.
|
Notice, I didn't made constructors and methods top level as a nested functions. So you cannot see where the parent declaration are. Though I have an another implementation that does it in #7178. And I filter out method declarations and constructors, which does not have any function declarations inside it. Like what you do for nested functions. You can close this PR if you prefer #7178. |
|
Closing in favor of #7178 . Because that solution would work as if the method where nested functions. |
Fixes #6828