File tree 2 files changed +16
-1
lines changed
2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -715,6 +715,7 @@ namespace ts.formatting {
715
715
case SyntaxKind . TypeReference :
716
716
case SyntaxKind . TypeAssertionExpression :
717
717
case SyntaxKind . ClassDeclaration :
718
+ case SyntaxKind . ClassExpression :
718
719
case SyntaxKind . InterfaceDeclaration :
719
720
case SyntaxKind . FunctionDeclaration :
720
721
case SyntaxKind . FunctionExpression :
@@ -725,6 +726,7 @@ namespace ts.formatting {
725
726
case SyntaxKind . ConstructSignature :
726
727
case SyntaxKind . CallExpression :
727
728
case SyntaxKind . NewExpression :
729
+ case SyntaxKind . ExpressionWithTypeArguments :
728
730
return true ;
729
731
default :
730
732
return false ;
Original file line number Diff line number Diff line change 14
14
////
15
15
////foo()<number, string, T >();
16
16
////(a + b)<number, string, T >();
17
+ ////
18
+ ////function bar<T>() {
19
+ /////*inClassExpression*/ return class < T2 > {
20
+ //// }
21
+ //// }
22
+ /////*expressionWithTypeArguments*/class A < T > extends bar < T >( ) < T > {
23
+ //// }
17
24
18
25
19
26
format . document ( ) ;
@@ -33,4 +40,10 @@ goTo.marker("inNewSignature");
33
40
verify . currentLineContentIs ( " new <T>(a: T);" ) ;
34
41
35
42
goTo . marker ( "inOptionalMethodSignature" ) ;
36
- verify . currentLineContentIs ( " op?<T, M>(a: T, b: M);" ) ;
43
+ verify . currentLineContentIs ( " op?<T, M>(a: T, b: M);" ) ;
44
+
45
+ goTo . marker ( "inClassExpression" ) ;
46
+ verify . currentLineContentIs ( " return class <T2> {" ) ;
47
+
48
+ goTo . marker ( "expressionWithTypeArguments" ) ;
49
+ verify . currentLineContentIs ( "class A<T> extends bar<T>()<T> {" ) ;
You can’t perform that action at this time.
0 commit comments