Skip to content

Commit 52d32e5

Browse files
committed
Add outlining spans for object destructuring elements
1 parent 9684bb2 commit 52d32e5

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed

src/services/outliningElementsCollector.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,7 @@ namespace ts.OutliningElementsCollector {
199199
case SyntaxKind.InterfaceDeclaration:
200200
case SyntaxKind.EnumDeclaration:
201201
case SyntaxKind.CaseBlock:
202+
case SyntaxKind.ObjectBindingPattern:
202203
return spanForNode(n);
203204
case SyntaxKind.CaseClause:
204205
case SyntaxKind.DefaultClause:
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
/// <reference path="fourslash.ts"/>
2+
3+
////const[| {
4+
//// a,
5+
//// b,
6+
//// c
7+
////}|] =[| {
8+
//// a: 1,
9+
//// b: 2,
10+
//// c: 3
11+
////}|]
12+
13+
////const[| {
14+
//// a:[| {
15+
//// a_1,
16+
//// a_2,
17+
//// a_3:[| {
18+
//// a_3_1,
19+
//// a_3_2,
20+
//// a_3_3,
21+
//// }|],
22+
//// }|],
23+
//// b,
24+
//// c
25+
////}|] =[| {
26+
//// a:[| {
27+
//// a_1: 1,
28+
//// a_2: 2,
29+
//// a_3:[| {
30+
//// a_3_1: 1,
31+
//// a_3_2: 1,
32+
//// a_3_3: 1
33+
//// }|],
34+
//// }|],
35+
//// b: 2,
36+
//// c: 3
37+
////}|]
38+
39+
verify.outliningSpansInCurrentFile(test.ranges(), "code");

0 commit comments

Comments
 (0)