File tree 2 files changed +20
-1
lines changed 2 files changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -463,7 +463,6 @@ namespace ts.formatting {
463
463
case SyntaxKind . VariableDeclaration :
464
464
case SyntaxKind . ExportAssignment :
465
465
case SyntaxKind . ReturnStatement :
466
- case SyntaxKind . ConditionalExpression :
467
466
case SyntaxKind . ArrayBindingPattern :
468
467
case SyntaxKind . ObjectBindingPattern :
469
468
case SyntaxKind . JsxOpeningElement :
@@ -512,6 +511,8 @@ namespace ts.formatting {
512
511
( ( < ImportClause > child ) . namedBindings && ( < ImportClause > child ) . namedBindings . kind !== SyntaxKind . NamedImports ) ;
513
512
case SyntaxKind . JsxElement :
514
513
return childKind !== SyntaxKind . JsxClosingElement ;
514
+ case SyntaxKind . ConditionalExpression :
515
+ return ( parent as ConditionalExpression ) . whenFalse !== child ;
515
516
}
516
517
// No explicit rule for given nodes so the result will follow the default value argument
517
518
return indentByDefault ;
Original file line number Diff line number Diff line change
1
+ /// <reference path="fourslash.ts"/>
2
+
3
+ ////let v =
4
+ //// 0 ? 1 :
5
+ //// //
6
+ /////*falseBranchExpression*/ 2 ? 3 :
7
+ /////*indent*/
8
+ //// //
9
+ /////*falseBranchToken*/ 2;
10
+
11
+ format . document ( ) ;
12
+
13
+ goTo . marker ( "falseBranchExpression" ) ;
14
+ verify . currentLineContentIs ( " 2 ? 3 :" ) ;
15
+ goTo . marker ( "indent" ) ;
16
+ verify . indentationIs ( 8 ) ;
17
+ goTo . marker ( "falseBranchToken" ) ;
18
+ verify . currentLineContentIs ( " 2;" ) ;
You can’t perform that action at this time.
0 commit comments