Skip to content

Commit 92a6374

Browse files
authored
fix(38080): add outlining spans for TypeLiteral (#38089)
1 parent 39beb1d commit 92a6374

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-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.TypeLiteral:
202203
return spanForNode(n);
203204
case SyntaxKind.CaseClause:
204205
case SyntaxKind.DefaultClause:
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/// <reference path="fourslash.ts"/>
2+
3+
////type A =[| {
4+
//// a: number;
5+
////}|]
6+
////
7+
////type B =[| {
8+
//// a:[| {
9+
//// a1:[| {
10+
//// a2:[| {
11+
//// x: number;
12+
//// y: number;
13+
//// }|]
14+
//// }|]
15+
//// }|],
16+
//// b:[| {
17+
//// x: number;
18+
//// }|],
19+
//// c:[| {
20+
//// x: number;
21+
//// }|]
22+
////}|]
23+
24+
verify.outliningSpansInCurrentFile(test.ranges(), "code");

0 commit comments

Comments
 (0)