fix(38080): add outlining spans for TypeLiteral (#38089)

This commit is contained in:
Alexander T 2020-04-22 18:51:36 +03:00 committed by GitHub
parent 39beb1d011
commit 92a63741a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 25 additions and 0 deletions

View File

@ -199,6 +199,7 @@ namespace ts.OutliningElementsCollector {
case SyntaxKind.InterfaceDeclaration:
case SyntaxKind.EnumDeclaration:
case SyntaxKind.CaseBlock:
case SyntaxKind.TypeLiteral:
return spanForNode(n);
case SyntaxKind.CaseClause:
case SyntaxKind.DefaultClause:

View File

@ -0,0 +1,24 @@
/// <reference path="fourslash.ts"/>
////type A =[| {
//// a: number;
////}|]
////
////type B =[| {
//// a:[| {
//// a1:[| {
//// a2:[| {
//// x: number;
//// y: number;
//// }|]
//// }|]
//// }|],
//// b:[| {
//// x: number;
//// }|],
//// c:[| {
//// x: number;
//// }|]
////}|]
verify.outliningSpansInCurrentFile(test.ranges(), "code");