Skip to content

Commit d3bcb82

Browse files
Merge pull request #29215 from uniqueiniquity/classExpressionOutline
Outlining spans for class expressions
2 parents 0dbb976 + adcb278 commit d3bcb82

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

src/services/outliningElementsCollector.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ namespace ts.OutliningElementsCollector {
175175
case SyntaxKind.ModuleBlock:
176176
return spanForNode(n.parent);
177177
case SyntaxKind.ClassDeclaration:
178+
case SyntaxKind.ClassExpression:
178179
case SyntaxKind.InterfaceDeclaration:
179180
case SyntaxKind.EnumDeclaration:
180181
case SyntaxKind.CaseBlock:

tests/cases/fourslash/getOutliningSpans.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@
2525
////
2626
//// }|]
2727
////}|]
28+
////// class expressions
29+
//// (new class[| {
30+
//// bla()[| {
31+
////
32+
//// }|]
33+
//// }|])
2834
////switch(1)[| {
2935
//// case 1: break;
3036
////}|]

0 commit comments

Comments
 (0)