diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 83b3dde7aa7..8d497758cfa 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -5093,14 +5093,7 @@ namespace ts { // Otherwise, returns all the diagnostics (global and file associated) in this collection. getDiagnostics(fileName?: string): Diagnostic[]; - // Gets a count of how many times this collection has been modified. This value changes - // each time 'add' is called (regardless of whether or not an equivalent diagnostic was - // already in the collection). As such, it can be used as a simple way to tell if any - // operation caused diagnostics to be returned by storing and comparing the return value - // of this method before/after the operation is performed. - getModificationCount(): number; - - /* @internal */ reattachFileDiagnostics(newFile: SourceFile): void; + reattachFileDiagnostics(newFile: SourceFile): void; } // SyntaxKind.SyntaxList diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 4f9dcf69310..9a6fbcc8c21 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -2557,20 +2557,14 @@ namespace ts { const filesWithDiagnostics = [] as SortedArray; const fileDiagnostics = createMap>(); let hasReadNonFileDiagnostics = false; - let modificationCount = 0; return { add, getGlobalDiagnostics, getDiagnostics, - getModificationCount, reattachFileDiagnostics }; - function getModificationCount() { - return modificationCount; - } - function reattachFileDiagnostics(newFile: SourceFile): void { forEach(fileDiagnostics.get(newFile.fileName), diagnostic => diagnostic.file = newFile); } @@ -2596,7 +2590,6 @@ namespace ts { } insertSorted(diagnostics, diagnostic, compareDiagnostics); - modificationCount++; } function getGlobalDiagnostics(): Diagnostic[] {