File tree 6 files changed +7
-6
lines changed 6 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -376,7 +376,7 @@ namespace FourSlash {
376
376
insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces : false ,
377
377
insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces : false ,
378
378
insertSpaceAfterTypeAssertion : false ,
379
- indentInsideTernaryOperator : false ,
379
+ indentConditionalExpressionFalseBranch : false ,
380
380
placeOpenBraceOnNewLineForFunctions : false ,
381
381
placeOpenBraceOnNewLineForControlBlocks : false ,
382
382
} ;
Original file line number Diff line number Diff line change @@ -2321,6 +2321,7 @@ namespace ts.server.protocol {
2321
2321
insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces ?: boolean ;
2322
2322
insertSpaceAfterTypeAssertion ?: boolean ;
2323
2323
insertSpaceBeforeFunctionParenthesis ?: boolean ;
2324
+ indentConditionalExpressionFalseBranch ?: boolean ;
2324
2325
placeOpenBraceOnNewLineForFunctions ?: boolean ;
2325
2326
placeOpenBraceOnNewLineForControlBlocks ?: boolean ;
2326
2327
}
Original file line number Diff line number Diff line change @@ -90,7 +90,7 @@ namespace ts.server {
90
90
insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces : false ,
91
91
insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces : false ,
92
92
insertSpaceBeforeFunctionParenthesis : false ,
93
- indentInsideTernaryOperator : false ,
93
+ indentConditionalExpressionFalseBranch : false ,
94
94
placeOpenBraceOnNewLineForFunctions : false ,
95
95
placeOpenBraceOnNewLineForControlBlocks : false ,
96
96
} ;
Original file line number Diff line number Diff line change @@ -512,7 +512,7 @@ namespace ts.formatting {
512
512
case SyntaxKind . JsxElement :
513
513
return childKind !== SyntaxKind . JsxClosingElement ;
514
514
case SyntaxKind . ConditionalExpression :
515
- return options . indentInsideTernaryOperator || ( parent as ConditionalExpression ) . whenFalse !== child ;
515
+ return options . indentConditionalExpressionFalseBranch || ( parent as ConditionalExpression ) . whenFalse !== child ;
516
516
}
517
517
// No explicit rule for given nodes so the result will follow the default value argument
518
518
return indentByDefault ;
Original file line number Diff line number Diff line change @@ -472,7 +472,7 @@ namespace ts {
472
472
insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces ?: boolean ;
473
473
insertSpaceAfterTypeAssertion ?: boolean ;
474
474
insertSpaceBeforeFunctionParenthesis ?: boolean ;
475
- indentInsideTernaryOperator ?: boolean ;
475
+ indentConditionalExpressionFalseBranch ?: boolean ;
476
476
placeOpenBraceOnNewLineForFunctions ?: boolean ;
477
477
placeOpenBraceOnNewLineForControlBlocks ?: boolean ;
478
478
}
Original file line number Diff line number Diff line change 13
13
//// ? ScanAction.RescanJsxText
14
14
//// : ScanAction.Scan;
15
15
16
- format . setOption ( "indentInsideTernaryOperator " , false ) ;
16
+ format . setOption ( "indentConditionalExpressionFalseBranch " , false ) ;
17
17
format . document ( ) ;
18
18
verify . currentFileContentIs ( `const expectedScanAction =
19
19
shouldRescanGreaterThanToken(n)
@@ -28,7 +28,7 @@ verify.currentFileContentIs(`const expectedScanAction =
28
28
? ScanAction.RescanJsxText
29
29
: ScanAction.Scan;` )
30
30
31
- format . setOption ( "indentInsideTernaryOperator " , true ) ;
31
+ format . setOption ( "indentConditionalExpressionFalseBranch " , true ) ;
32
32
format . document ( ) ;
33
33
verify . currentFileContentIs ( `const expectedScanAction =
34
34
shouldRescanGreaterThanToken(n)
You can’t perform that action at this time.
0 commit comments