-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
Conversation
return { info: renameInfo, locs: deduplicate(locs, areSpanGroupsForTheSameFile) }; | ||
|
||
function areSpanGroupsForTheSameFile(a: protocol.SpanGroup, b: protocol.SpanGroup) { | ||
if (a && b) { |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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.
@mhegazy @DanielRosenwasser any further comments? |
👍 |
… i2531 # Conflicts: # src/server/session.ts
hi @zhengbli, |
Fixes #2531