mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-06 02:33:53 -06:00
Add outlining spans for object destructuring elements
This commit is contained in:
parent
9684bb21e1
commit
52d32e5597
@ -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");
|
||||
Loading…
x
Reference in New Issue
Block a user