Remove unused method (#23000)

This commit is contained in:
Andy 2018-03-29 15:44:06 -07:00 committed by GitHub
parent 5cef6274c3
commit 09cfc0f9ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 15 deletions

View File

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

View File

@ -2557,20 +2557,14 @@ namespace ts {
const filesWithDiagnostics = [] as SortedArray<string>;
const fileDiagnostics = createMap<SortedArray<Diagnostic>>();
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[] {