Skip to content

Commit

Permalink
Make display string optional in ts/js hover
Browse files Browse the repository at this point in the history
  • Loading branch information
mjbvz committed Sep 21, 2017
1 parent 7a3c668 commit b86108e
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions extensions/typescript/src/features/hoverProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,14 @@ export default class TypeScriptHoverProvider implements HoverProvider {
}

private static getContents(data: Proto.QuickInfoResponseBody) {
const parts = [];

if (data.displayString) {
parts.push({ language: 'typescript', value: data.displayString });
}

const tags = tagsMarkdownPreview(data.tags);
return [
{ language: 'typescript', value: data.displayString },
data.documentation + (tags ? '\n\n' + tags : '')
];
parts.push(data.documentation + (tags ? '\n\n' + tags : ''));
return parts;
}
}

0 comments on commit b86108e

Please sign in to comment.