File tree 2 files changed +32
-0
lines changed 2 files changed +32
-0
lines changed Original file line number Diff line number Diff line change
1
+ /// <reference path='fourslash.ts'/>
2
+
3
+ ////let foo = 1;
4
+ ////switch (foo) {
5
+ /////*1*/case 0:
6
+ /////*2*/break;
7
+ /////*3*/default:
8
+ /////*4*/break;
9
+ //// }
10
+
11
+ format . setOption ( 'indentSwitchCase' , true ) ;
12
+ format . document ( ) ;
13
+ goTo . marker ( '1' ) ;
14
+ verify . indentationIs ( 4 ) ;
15
+ goTo . marker ( '2' ) ;
16
+ verify . indentationIs ( 8 ) ;
17
+ goTo . marker ( '3' ) ;
18
+ verify . indentationIs ( 4 ) ;
19
+ goTo . marker ( '4' ) ;
20
+ verify . indentationIs ( 8 ) ;
21
+
22
+ format . setOption ( 'indentSwitchCase' , false ) ;
23
+ format . document ( ) ;
24
+ goTo . marker ( '1' ) ;
25
+ verify . indentationIs ( 0 ) ;
26
+ goTo . marker ( '2' ) ;
27
+ verify . indentationIs ( 4 ) ;
28
+ goTo . marker ( '3' ) ;
29
+ verify . indentationIs ( 0 ) ;
30
+ goTo . marker ( '4' ) ;
31
+ verify . indentationIs ( 4 ) ;
Original file line number Diff line number Diff line change @@ -196,6 +196,7 @@ declare namespace FourSlashInterface {
196
196
readonly insertSpaceBeforeTypeAnnotation ?: boolean ;
197
197
readonly indentMultiLineObjectLiteralBeginningOnBlankLine ?: boolean ;
198
198
readonly semicolons ?: ts . SemicolonPreference ;
199
+ readonly indentSwitchCase ?: boolean ;
199
200
}
200
201
interface Range {
201
202
fileName : string ;
You can’t perform that action at this time.
0 commit comments