Skip to content

Conversation

ghost
Copy link

@ghost ghost commented May 31, 2018

Fixes the implementations part of #15109

Instead of adding a second span, I don't think there's a particular reason we used the full declaration span in the first place -- the rest of find-all-references uses the name span.

// need to "Find all References"
const symbol = checker.getSymbolAtLocation(node)!;
return symbol.valueDeclaration && [nodeEntry(symbol.valueDeclaration)];
return symbol.valueDeclaration && [nodeEntry((symbol.valueDeclaration as NamedDeclaration).name || symbol.valueDeclaration)];
Copy link
Member

Choose a reason for hiding this comment

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

why not instead make nodeEntry do node.name || node as the span?

@ghost ghost merged commit 9d42ab9 into master May 31, 2018
@ghost ghost deleted the implementationSpan branch May 31, 2018 20:32
@microsoft microsoft locked and limited conversation to collaborators Jul 31, 2018
This pull request was closed.
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.

2 participants