Skip to content

Commit 09cfc0f

Browse files
author
Andy
authored
Remove unused method (#23000)
1 parent 5cef627 commit 09cfc0f

File tree

2 files changed

+1
-15
lines changed

2 files changed

+1
-15
lines changed

src/compiler/types.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5093,14 +5093,7 @@ namespace ts {
50935093
// Otherwise, returns all the diagnostics (global and file associated) in this collection.
50945094
getDiagnostics(fileName?: string): Diagnostic[];
50955095

5096-
// Gets a count of how many times this collection has been modified. This value changes
5097-
// each time 'add' is called (regardless of whether or not an equivalent diagnostic was
5098-
// already in the collection). As such, it can be used as a simple way to tell if any
5099-
// operation caused diagnostics to be returned by storing and comparing the return value
5100-
// of this method before/after the operation is performed.
5101-
getModificationCount(): number;
5102-
5103-
/* @internal */ reattachFileDiagnostics(newFile: SourceFile): void;
5096+
reattachFileDiagnostics(newFile: SourceFile): void;
51045097
}
51055098

51065099
// SyntaxKind.SyntaxList

src/compiler/utilities.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2557,20 +2557,14 @@ namespace ts {
25572557
const filesWithDiagnostics = [] as SortedArray<string>;
25582558
const fileDiagnostics = createMap<SortedArray<Diagnostic>>();
25592559
let hasReadNonFileDiagnostics = false;
2560-
let modificationCount = 0;
25612560

25622561
return {
25632562
add,
25642563
getGlobalDiagnostics,
25652564
getDiagnostics,
2566-
getModificationCount,
25672565
reattachFileDiagnostics
25682566
};
25692567

2570-
function getModificationCount() {
2571-
return modificationCount;
2572-
}
2573-
25742568
function reattachFileDiagnostics(newFile: SourceFile): void {
25752569
forEach(fileDiagnostics.get(newFile.fileName), diagnostic => diagnostic.file = newFile);
25762570
}
@@ -2596,7 +2590,6 @@ namespace ts {
25962590
}
25972591

25982592
insertSorted(diagnostics, diagnostic, compareDiagnostics);
2599-
modificationCount++;
26002593
}
26012594

26022595
function getGlobalDiagnostics(): Diagnostic[] {

0 commit comments

Comments
 (0)