@@ -50,6 +50,8 @@ namespace ts.formatting {
50
50
// Insert a space after { and before } in single-line contexts, but remove space from empty object literals {}.
51
51
public SpaceAfterOpenBrace : Rule ;
52
52
public SpaceBeforeCloseBrace : Rule ;
53
+ public NoSpaceAfterOpenBrace : Rule ;
54
+ public NoSpaceBeforeCloseBrace : Rule ;
53
55
public NoSpaceBetweenEmptyBraceBrackets : Rule ;
54
56
55
57
// Insert new line after { and before } in multi-line contexts.
@@ -287,6 +289,8 @@ namespace ts.formatting {
287
289
// Insert a space after { and before } in single-line contexts, but remove space from empty object literals {}.
288
290
this . SpaceAfterOpenBrace = new Rule ( RuleDescriptor . create3 ( SyntaxKind . OpenBraceToken , Shared . TokenRange . Any ) , RuleOperation . create2 ( new RuleOperationContext ( Rules . IsSingleLineBlockContext ) , RuleAction . Space ) ) ;
289
291
this . SpaceBeforeCloseBrace = new Rule ( RuleDescriptor . create2 ( Shared . TokenRange . Any , SyntaxKind . CloseBraceToken ) , RuleOperation . create2 ( new RuleOperationContext ( Rules . IsSingleLineBlockContext ) , RuleAction . Space ) ) ;
292
+ this . NoSpaceAfterOpenBrace = new Rule ( RuleDescriptor . create3 ( SyntaxKind . OpenBraceToken , Shared . TokenRange . Any ) , RuleOperation . create2 ( new RuleOperationContext ( Rules . IsSingleLineBlockContext ) , RuleAction . Delete ) ) ;
293
+ this . NoSpaceBeforeCloseBrace = new Rule ( RuleDescriptor . create2 ( Shared . TokenRange . Any , SyntaxKind . CloseBraceToken ) , RuleOperation . create2 ( new RuleOperationContext ( Rules . IsSingleLineBlockContext ) , RuleAction . Delete ) ) ;
290
294
this . NoSpaceBetweenEmptyBraceBrackets = new Rule ( RuleDescriptor . create1 ( SyntaxKind . OpenBraceToken , SyntaxKind . CloseBraceToken ) , RuleOperation . create2 ( new RuleOperationContext ( Rules . IsNonJsxSameLineTokenContext , Rules . IsObjectContext ) , RuleAction . Delete ) ) ;
291
295
292
296
// Insert new line after { and before } in multi-line contexts.
@@ -414,7 +418,7 @@ namespace ts.formatting {
414
418
this . SpaceAfterPostdecrementWhenFollowedBySubtract ,
415
419
this . SpaceAfterSubtractWhenFollowedByUnaryMinus , this . SpaceAfterSubtractWhenFollowedByPredecrement ,
416
420
this . NoSpaceAfterCloseBrace ,
417
- this . SpaceAfterOpenBrace , this . SpaceBeforeCloseBrace , this . NewLineBeforeCloseBraceInBlockContext ,
421
+ this . NewLineBeforeCloseBraceInBlockContext ,
418
422
this . SpaceAfterCloseBrace , this . SpaceBetweenCloseBraceAndElse , this . SpaceBetweenCloseBraceAndWhile , this . NoSpaceBetweenEmptyBraceBrackets ,
419
423
this . NoSpaceBetweenFunctionKeywordAndStar , this . SpaceAfterStarInGeneratorDeclaration ,
420
424
this . SpaceAfterFunctionInFuncDecl , this . NewLineAfterOpenBraceInBlockContext , this . SpaceAfterGetSetInMember ,
0 commit comments