Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Navigation bar items in methods #7177

Closed

Conversation

tinganho
Copy link
Contributor

Fixes #6828

else {
const grandParentKind = functionDeclaration.parent.parent.kind;
if (grandParentKind === SyntaxKind.MethodDeclaration ||
grandParentKind === SyntaxKind.Constructor) {
Copy link
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
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
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
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