Skip to content

Navigation bar items in methods#7177

Closed
tinganho wants to merge 3 commits into
microsoft:masterfrom
tinganho:navigationBarItemInMethods
Closed

Navigation bar items in methods#7177
tinganho wants to merge 3 commits into
microsoft:masterfrom
tinganho:navigationBarItemInMethods

Conversation

@tinganho

Copy link
Copy Markdown
Contributor

Fixes #6828

else {
const grandParentKind = functionDeclaration.parent.parent.kind;
if (grandParentKind === SyntaxKind.MethodDeclaration ||
grandParentKind === SyntaxKind.Constructor) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When won't isFunctionBlock cover these cases?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@tinganho

Copy link
Copy Markdown
Contributor Author

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.

@tinganho

Copy link
Copy Markdown
Contributor Author

Closing in favor of #7178 . Because that solution would work as if the method where nested functions.

@tinganho tinganho closed this Feb 22, 2016
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants