Skip to content

Conversation

ghost
Copy link

@ghost ghost commented Jan 19, 2018

No description provided.

@ghost ghost requested a review from armanio123 January 19, 2018 22:01
}
}
return firstDefined((getJsDocHavingNode(node) as JSDocContainer).jsDoc, ({ pos, end, tags }) =>
pos <= position && position <= end ? findLast(tags, tag => position >= tag.pos) : undefined);
Copy link
Member

Choose a reason for hiding this comment

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

Pretty sure we have helper functions for determining inclusion of positions.

Copy link
Author

Choose a reason for hiding this comment

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

Added a textRangeContainsPositionInclusive helper.

return undefined;

function findReferenceInPosition(refs: ReadonlyArray<FileReference>, pos: number): FileReference | undefined {
return find(refs, ref => ref.pos <= pos && pos <= ref.end);
Copy link
Member

Choose a reason for hiding this comment

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

Same here

@ghost
Copy link
Author

ghost commented Feb 27, 2018

@DanielRosenwasser Could you review again?

@typescript-bot
Copy link
Collaborator

Thanks for your contribution. This PR has not been updated in a while and cannot be automatically merged at the time being. For housekeeping purposes we are closing stale PRs. If you'd still like to continue working on this PR, please leave a message and one of the maintainers can reopen it.

@ghost ghost reopened this Jun 28, 2018
@ghost
Copy link
Author

ghost commented Jun 28, 2018

@DanielRosenwasser Could you review again?

@ghost ghost merged commit a1746d4 into master Jun 30, 2018
@ghost ghost deleted the helpers branch June 30, 2018 03:07
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants