Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/services/outliningElementsCollector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ namespace ts.OutliningElementsCollector {
case SyntaxKind.EnumDeclaration:
case SyntaxKind.CaseBlock:
case SyntaxKind.TypeLiteral:
case SyntaxKind.ObjectBindingPattern:
return spanForNode(n);
case SyntaxKind.CaseClause:
case SyntaxKind.DefaultClause:
Expand Down
39 changes: 39 additions & 0 deletions tests/cases/fourslash/getOutliningForObjectDestructuring.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/// <reference path="fourslash.ts"/>

////const[| {
//// a,
//// b,
//// c
////}|] =[| {
//// a: 1,
//// b: 2,
//// c: 3
////}|]

////const[| {
//// a:[| {
//// a_1,
//// a_2,
//// a_3:[| {
//// a_3_1,
//// a_3_2,
//// a_3_3,
//// }|],
//// }|],
//// b,
//// c
////}|] =[| {
//// a:[| {
//// a_1: 1,
//// a_2: 2,
//// a_3:[| {
//// a_3_1: 1,
//// a_3_2: 1,
//// a_3_3: 1
//// }|],
//// }|],
//// b: 2,
//// c: 3
////}|]

verify.outliningSpansInCurrentFile(test.ranges(), "code");