Skip to content

findAllReferences: Consistently use getTextSpan#22847

Merged
2 commits merged into
masterfrom
getTextSpan
Mar 28, 2018
Merged

findAllReferences: Consistently use getTextSpan#22847
2 commits merged into
masterfrom
getTextSpan

Conversation

@ghost
Copy link
Copy Markdown

@ghost ghost commented Mar 23, 2018

Fixes #22690

@ghost ghost requested a review from sheetalkamat March 23, 2018 22:37
Comment thread src/services/findAllReferences.ts Outdated

function getTextSpan(node: Node): TextSpan {
let start = node.getStart();
function getTextSpan(node: Node, sourceFile = node.getSourceFile()): TextSpan {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

no need for the initializer, you want to pass the sourceFile if you have it, otherwise, getStart will walk up and find it, if it needs it.

Copy link
Copy Markdown
Contributor

@mhegazy mhegazy left a comment

Choose a reason for hiding this comment

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

👍 With removing the initializer

@ghost ghost merged commit 4f16560 into master Mar 28, 2018
@ghost ghost deleted the getTextSpan branch March 28, 2018 02:36
@microsoft microsoft locked and limited conversation to collaborators Jul 25, 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.

1 participant