mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-30 01:04:49 -05:00
Merge pull request #12856 from minestarks/includejsdoctags
Expose JSDoc tags through the language service
This commit is contained in:
@@ -178,7 +178,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
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -1319,6 +1319,11 @@ namespace ts.server.protocol {
|
||||
* Documentation associated with symbol.
|
||||
*/
|
||||
documentation: string;
|
||||
|
||||
/**
|
||||
* JSDoc tags associated with symbol.
|
||||
*/
|
||||
tags: JSDocTagInfo[];
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1549,6 +1554,11 @@ namespace ts.server.protocol {
|
||||
* Documentation strings for the symbol.
|
||||
*/
|
||||
documentation: SymbolDisplayPart[];
|
||||
|
||||
/**
|
||||
* JSDoc tags for the symbol.
|
||||
*/
|
||||
tags: JSDocTagInfo[];
|
||||
}
|
||||
|
||||
export interface CompletionsResponse extends Response {
|
||||
@@ -1619,6 +1629,11 @@ namespace ts.server.protocol {
|
||||
* The signature's documentation
|
||||
*/
|
||||
documentation: SymbolDisplayPart[];
|
||||
|
||||
/**
|
||||
* The signature's JSDoc tags
|
||||
*/
|
||||
tags: JSDocTagInfo[];
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1020,6 +1020,7 @@ namespace ts.server {
|
||||
if (simplifiedResult) {
|
||||
const displayString = ts.displayPartsToString(quickInfo.displayParts);
|
||||
const docString = ts.displayPartsToString(quickInfo.documentation);
|
||||
|
||||
return {
|
||||
kind: quickInfo.kind,
|
||||
kindModifiers: quickInfo.kindModifiers,
|
||||
@@ -1027,6 +1028,7 @@ namespace ts.server {
|
||||
end: scriptInfo.positionToLineOffset(ts.textSpanEnd(quickInfo.textSpan)),
|
||||
displayString: displayString,
|
||||
documentation: docString,
|
||||
tags: quickInfo.tags || []
|
||||
};
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user