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 #7178

Merged

Conversation

tinganho
Copy link
Contributor

An alternative PR to #7177. Fixes #6828.

@tinganho tinganho changed the title Navigation bar item top level function like member Navigation bar items on methods Feb 28, 2016
@tinganho tinganho changed the title Navigation bar items on methods Navigation bar items in methods Feb 28, 2016
@@ -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) => {
Copy link
Member

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

@tinganho
Copy link
Contributor Author

tinganho commented Mar 3, 2016

@DanielRosenwasser I addressed your feedback.

@mhegazy
Copy link
Contributor

mhegazy commented Mar 25, 2016

Ping @DanielRosenwasser. can you take another look.

if (forEach(nodes, s => s.kind === SyntaxKind.FunctionDeclaration && !isEmpty((<FunctionDeclaration>s).name.text))) {
return true;
}
}
Copy link
Member

Choose a reason for hiding this comment

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

Explicitly return false

@DanielRosenwasser
Copy link
Member

Looks fine to me. Can you pull in from master to resolve any conflicts @tinganho?

@tinganho tinganho force-pushed the navigationBarItemTopLevel branch from 50a9481 to b7c3547 Compare March 26, 2016 18:43
@tinganho
Copy link
Contributor Author

Done.

@DanielRosenwasser DanielRosenwasser merged commit 89350b3 into microsoft:master Mar 26, 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.

4 participants