-
Notifications
You must be signed in to change notification settings - Fork 13k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: OutliningRelates to multi-line regions that editors can collapseRelates to multi-line regions that editors can collapseFixedA PR has been merged for this issueA PR has been merged for this issue
Milestone
Description
TypeScript Version: [email protected]
Search Terms:
- folding / fold / outlining
- getOutliningSpans
Code
For the code:
router
.get("/", async(ctx) => {
ctx.body = "base";
})
.post("/a", async(ctx) => {
//a
})
.post("/b", async(ctx) => {
//b
})
.post("/c", async(ctx) => {
//c
})
.get("/d", async(ctx) => {
//d
})
.get("/e", async(ctx) => {
//e
})
.get("/f", async(ctx) => {
//f
})
.get("/g", async(ctx) => {
//g
})
.patch("/h", async(ctx) => {
//h
})
.patch("/i", async(ctx) => {
//i
})
.get("/j", async(ctx) => {
//j
})
.delete("/k", async(ctx) => {
//k
})
.post("/l", async(ctx) => {
//l
})
.get("/m", async(ctx) => {
//m
})
.delete("/n", async(ctx) => {
//n
})
.patch("/o", async(ctx) => {
//o
})
.patch("/p", async(ctx) => {
//p
})
.patch("/q", async(ctx) => {
//q
})
.patch("/r", async(ctx) => {
//r
})
.get("/s", async(ctx) => {
//s
})
.get("/t", async(ctx) => {
//t
})
.get("/u", async(ctx) => {
//u
})
.post("/v", async(ctx) => {
//v
})
.patch("/w", async(ctx) => {
//w
})
.get("/x", async(ctx) => {
//x
})
.patch("/y", async(ctx) => {
//y
})
.get("/z", async(ctx) => {
//z
})
.post("/a1", async(ctx) => {
//a1
})
.get("/b1", async(ctx) => {
//b1
})
.put("/c1", async(ctx) => {
//c1
})
.get("/d1", async(ctx) => {
//d1
})
.get("/e1", async(ctx) => {
//e1
})
.post("/f1", async(ctx) => {
//f1
})
Try folding everything
Actual behavior:
The getOutliningSpans
response doesn't include the initial spans
Trace - 9:46:15 AM] <syntax> Response received: getOutliningSpans (5). Request took 288 ms. Success: true
Result: [
{
"textSpan": {
"start": {
"line": 44,
"offset": 32
},
"end": {
"line": 46,
"offset": 6
}
},
"hintSpan": {
"start": {
"line": 44,
"offset": 19
},
"end": {
"line": 46,
"offset": 6
}
},
"bannerText": "...",
"autoCollapse": false,
"kind": "code"
},
{
"textSpan": {
"start": {
"line": 47,
"offset": 31
},
"end": {
"line": 49,
"offset": 6
}
},
"hintSpan": {
"start": {
"line": 47,
"offset": 18
},
"end": {
"line": 49,
"offset": 6
}
},
"bannerText": "...",
"autoCollapse": false,
"kind": "code"
},
{
"textSpan": {
"start": {
"line": 50,
"offset": 31
},
"end": {
"line": 52,
"offset": 6
}
},
"hintSpan": {
"start": {
"line": 50,
"offset": 18
},
"end": {
"line": 52,
"offset": 6
}
},
"bannerText": "...",
"autoCollapse": false,
"kind": "code"
},
{
"textSpan": {
"start": {
"line": 53,
"offset": 31
},
"end": {
"line": 55,
"offset": 6
}
},
"hintSpan": {
"start": {
"line": 53,
"offset": 18
},
"end": {
"line": 55,
"offset": 6
}
},
"bannerText": "...",
"autoCollapse": false,
"kind": "code"
},
{
"textSpan": {
"start": {
"line": 56,
"offset": 31
},
"end": {
"line": 58,
"offset": 6
}
},
"hintSpan": {
"start": {
"line": 56,
"offset": 18
},
"end": {
"line": 58,
"offset": 6
}
},
"bannerText": "...",
"autoCollapse": false,
"kind": "code"
},
...
Playground Link:
Related Issues:
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: OutliningRelates to multi-line regions that editors can collapseRelates to multi-line regions that editors can collapseFixedA PR has been merged for this issueA PR has been merged for this issue