-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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 #7178
Navigation bar items in methods #7178
Conversation
@@ -154,6 +154,20 @@ namespace ts.NavigationBar { | |||
for (let node of nodes) { | |||
switch (node.kind) { | |||
case SyntaxKind.ClassDeclaration: | |||
topLevelNodes.push(node); | |||
forEach((<ClassDeclaration>node).members, (node) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use for-of
over forEach unless you're unsure whether the first argument is undefined
@DanielRosenwasser I addressed your feedback. |
Ping @DanielRosenwasser. can you take another look. |
if (forEach(nodes, s => s.kind === SyntaxKind.FunctionDeclaration && !isEmpty((<FunctionDeclaration>s).name.text))) { | ||
return true; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Explicitly return false
Looks fine to me. Can you pull in from master to resolve any conflicts @tinganho? |
50a9481
to
b7c3547
Compare
Done. |
An alternative PR to #7177. Fixes #6828.