mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-17 21:06:50 -05:00
Add JSDoc tag support for QuickInfo
This commit is contained in:
@@ -176,7 +176,8 @@ namespace ts.server {
|
||||
kindModifiers: response.body.kindModifiers,
|
||||
textSpan: ts.createTextSpanFromBounds(start, end),
|
||||
displayParts: [{ kind: "text", text: response.body.displayString }],
|
||||
documentation: [{ kind: "text", text: response.body.documentation }]
|
||||
documentation: [{ kind: "text", text: response.body.documentation }],
|
||||
tags: response.body.tags
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -1295,6 +1295,11 @@ namespace ts.server.protocol {
|
||||
* Documentation associated with symbol.
|
||||
*/
|
||||
documentation: string;
|
||||
|
||||
/**
|
||||
* JSDoc tags associated with symbol.
|
||||
*/
|
||||
tags: JSDocTagInfo[]
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -853,6 +853,11 @@ namespace ts.server {
|
||||
if (simplifiedResult) {
|
||||
const displayString = ts.displayPartsToString(quickInfo.displayParts);
|
||||
const docString = ts.displayPartsToString(quickInfo.documentation);
|
||||
let tags: ts.JSDocTagInfo[] = [];
|
||||
if (quickInfo.tags) {
|
||||
tags = quickInfo.tags;
|
||||
}
|
||||
|
||||
return {
|
||||
kind: quickInfo.kind,
|
||||
kindModifiers: quickInfo.kindModifiers,
|
||||
@@ -860,6 +865,7 @@ namespace ts.server {
|
||||
end: scriptInfo.positionToLineOffset(ts.textSpanEnd(quickInfo.textSpan)),
|
||||
displayString: displayString,
|
||||
documentation: docString,
|
||||
tags: tags
|
||||
};
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user