Browse Source

Support for TypeScript 4.4

Orta 4 years ago
parent
commit
9524853450
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/languageFeatures.ts

+ 2 - 2
src/languageFeatures.ts

@@ -333,9 +333,9 @@ export class DiagnosticsAdapter extends Adapter {
 	private _convertRelatedInformation(
 		model: editor.ITextModel,
 		relatedInformation?: DiagnosticRelatedInformation[]
-	): editor.IRelatedInformation[] | undefined {
+	): editor.IRelatedInformation[] {
 		if (!relatedInformation) {
-			return;
+			return [];
 		}
 
 		const result: editor.IRelatedInformation[] = [];