-
Notifications
You must be signed in to change notification settings - Fork 13.1k
Closed
Labels
CommittedThe team has roadmapped this issueThe team has roadmapped this issueDomain: LS: OutliningRelates to multi-line regions that editors can collapseRelates to multi-line regions that editors can collapseSuggestionAn idea for TypeScriptAn idea for TypeScript
Milestone
Description
TypeScript Version: typescript@3.1.0-dev.20180727
Search Terms:
- outlining, fold, folding
- comments
Code
For the js
/**
* Return a sum
* @param y {Number}
* @param z {Number}
* @returns {Number} the sum of y and z
*/
function sum1(y, z) {
return y + z;
}
/**
* Return a sum
* @param y {Number}
* @param z {Number}
* @returns {Number} the sum of y and z
*/
const sum2 = (y, z) => {
return y + z;
};Expected behavior:
An outlining span is returned for both jsdoc comments.
Actual behavior:
A folding span is only returned for the first comment
[Trace - 11:26:30 AM] Response received: getOutliningSpans (36). Request took 3 ms. Success: true
Result: [
{
"textSpan": {
"start": {
"line": 1,
"offset": 1
},
"end": {
"line": 6,
"offset": 4
}
},
"hintSpan": {
"start": {
"line": 1,
"offset": 1
},
"end": {
"line": 6,
"offset": 4
}
},
"bannerText": "...",
"autoCollapse": false,
"kind": "comment"
},
{
"textSpan": {
"start": {
"line": 7,
"offset": 20
},
"end": {
"line": 9,
"offset": 2
}
},
"hintSpan": {
"start": {
"line": 7,
"offset": 1
},
"end": {
"line": 9,
"offset": 2
}
},
"bannerText": "...",
"autoCollapse": true,
"kind": "code"
},
{
"textSpan": {
"start": {
"line": 17,
"offset": 23
},
"end": {
"line": 19,
"offset": 2
}
},
"hintSpan": {
"start": {
"line": 17,
"offset": 14
},
"end": {
"line": 19,
"offset": 2
}
},
"bannerText": "...",
"autoCollapse": false,
"kind": "code"
}
]
Metadata
Metadata
Assignees
Labels
CommittedThe team has roadmapped this issueThe team has roadmapped this issueDomain: LS: OutliningRelates to multi-line regions that editors can collapseRelates to multi-line regions that editors can collapseSuggestionAn idea for TypeScriptAn idea for TypeScript