mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-15 03:23:08 -06:00
fix(38080): add outlining spans for TypeLiteral (#38089)
This commit is contained in:
parent
39beb1d011
commit
92a63741a2
@ -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:
|
||||
|
||||
24
tests/cases/fourslash/getOutliningForTypeLiteral.ts
Normal file
24
tests/cases/fourslash/getOutliningForTypeLiteral.ts
Normal 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");
|
||||
Loading…
x
Reference in New Issue
Block a user