|
@@ -370,9 +370,9 @@ export class DiagnosticsAdapter extends Adapter {
|
|
private _convertRelatedInformation(
|
|
private _convertRelatedInformation(
|
|
model: editor.ITextModel,
|
|
model: editor.ITextModel,
|
|
relatedInformation?: DiagnosticRelatedInformation[]
|
|
relatedInformation?: DiagnosticRelatedInformation[]
|
|
- ): editor.IRelatedInformation[] | undefined {
|
|
|
|
|
|
+ ): editor.IRelatedInformation[] {
|
|
if (!relatedInformation) {
|
|
if (!relatedInformation) {
|
|
- return;
|
|
|
|
|
|
+ return [];
|
|
}
|
|
}
|
|
|
|
|
|
const result: editor.IRelatedInformation[] = [];
|
|
const result: editor.IRelatedInformation[] = [];
|
|
@@ -572,9 +572,9 @@ export class SuggestAdapter extends Adapter implements languages.CompletionItemP
|
|
function tagToString(tag: ts.JSDocTagInfo): string {
|
|
function tagToString(tag: ts.JSDocTagInfo): string {
|
|
let tagLabel = `*@${tag.name}*`;
|
|
let tagLabel = `*@${tag.name}*`;
|
|
if (tag.name === 'param' && tag.text) {
|
|
if (tag.name === 'param' && tag.text) {
|
|
- const [paramName, ...rest] = tag.text.split(' ');
|
|
|
|
- tagLabel += `\`${paramName}\``;
|
|
|
|
- if (rest.length > 0) tagLabel += ` — ${rest.join(' ')}`;
|
|
|
|
|
|
+ const [paramName, ...rest] = tag.text;
|
|
|
|
+ tagLabel += `\`${paramName.text}\``;
|
|
|
|
+ if (rest.length > 0) tagLabel += ` — ${rest.map(r => r.text).join(' ')}`;
|
|
} else if (tag.text) {
|
|
} else if (tag.text) {
|
|
tagLabel += ` — ${tag.text}`;
|
|
tagLabel += ` — ${tag.text}`;
|
|
}
|
|
}
|