mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-15 21:36:50 -05:00
Add outlining spans for object destructuring elements
This commit is contained in:
@@ -199,6 +199,7 @@ namespace ts.OutliningElementsCollector {
|
||||
case SyntaxKind.InterfaceDeclaration:
|
||||
case SyntaxKind.EnumDeclaration:
|
||||
case SyntaxKind.CaseBlock:
|
||||
case SyntaxKind.ObjectBindingPattern:
|
||||
return spanForNode(n);
|
||||
case SyntaxKind.CaseClause:
|
||||
case SyntaxKind.DefaultClause:
|
||||
|
||||
39
tests/cases/fourslash/getOutliningForObjectDestructuring.ts
Normal file
39
tests/cases/fourslash/getOutliningForObjectDestructuring.ts
Normal file
@@ -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");
|
||||
Reference in New Issue
Block a user