extensions/typescript-language-features/src/languageFeatures/diagnostics.ts/FileDiagnostics/updateDiagnostics
class FileDiagnostics:	public updateDiagnostics(
		language: DiagnosticLanguage,
		kind: DiagnosticKind,
		diagnostics: ReadonlyArray<vscode.Diagnostic>
	): boolean {
		if (language !== this.language) {
			this._diagnostics.clear();
			this.language = language;
		}

		const existing = this._diagnostics.get(kind);
		if (arrays.equals(existing || arrays.empty, diagnostics, diagnosticsEquals)) {
			// No need to update
			return false;
		}

		this._diagnostics.set(kind, diagnostics);
		return true;
	}