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

Enable tsserver global operations to be performed on all projects #7353

Merged
merged 8 commits into from
Apr 21, 2016

Conversation

zhengbli
Copy link
Contributor

@zhengbli zhengbli commented Mar 3, 2016

Fixes #2531

@zhengbli
Copy link
Contributor Author

zhengbli commented Mar 7, 2016

Ping @mhegazy and @vladima

return { info: renameInfo, locs: deduplicate(locs, areSpanGroupsForTheSameFile) };

function areSpanGroupsForTheSameFile(a: protocol.SpanGroup, b: protocol.SpanGroup) {
if (a && b) {
Copy link
Contributor

Choose a reason for hiding this comment

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

return a && b && return a.file === b.file;

if (array) {
for (const v of array) {
if (v === value) {
if (areEqual) {
Copy link
Member

Choose a reason for hiding this comment

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

if (areEqual ? areEqual(v, value) : v === value) {
   return true;
}

@@ -464,7 +464,7 @@ namespace ts.server {
return copiedList;
}

export function forEachProject<T>(projects: Project[], action: (project: Project) => T[], comparer?: (a: T, b: T) => number, areEqual?: (a: T, b: T) => boolean) {
export function processEachProjectThenConcatSortDeduplicateResults<T>(projects: Project[], action: (project: Project) => T[], comparer?: (a: T, b: T) => number, areEqual?: (a: T, b: T) => boolean) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Wow.. That is long.. How about reduceProjectOutput, or combineProjectOutput.

@zhengbli
Copy link
Contributor Author

@mhegazy @DanielRosenwasser any further comments?

@mhegazy
Copy link
Contributor

mhegazy commented Apr 20, 2016

👍

@heroboy
Copy link

heroboy commented Jun 24, 2016

hi @zhengbli,
please look at this microsoft/vscode#8081.
Is it relate to this?

@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.

5 participants