@@ -50,6 +50,8 @@ namespace ts.formatting {
5050 // Insert a space after { and before } in single-line contexts, but remove space from empty object literals {}.
5151 public SpaceAfterOpenBrace : Rule ;
5252 public SpaceBeforeCloseBrace : Rule ;
53+ public NoSpaceAfterOpenBrace : Rule ;
54+ public NoSpaceBeforeCloseBrace : Rule ;
5355 public NoSpaceBetweenEmptyBraceBrackets : Rule ;
5456
5557 // Insert new line after { and before } in multi-line contexts.
@@ -287,6 +289,8 @@ namespace ts.formatting {
287289 // Insert a space after { and before } in single-line contexts, but remove space from empty object literals {}.
288290 this . SpaceAfterOpenBrace = new Rule ( RuleDescriptor . create3 ( SyntaxKind . OpenBraceToken , Shared . TokenRange . Any ) , RuleOperation . create2 ( new RuleOperationContext ( Rules . IsSingleLineBlockContext ) , RuleAction . Space ) ) ;
289291 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 ) ) ;
290294 this . NoSpaceBetweenEmptyBraceBrackets = new Rule ( RuleDescriptor . create1 ( SyntaxKind . OpenBraceToken , SyntaxKind . CloseBraceToken ) , RuleOperation . create2 ( new RuleOperationContext ( Rules . IsNonJsxSameLineTokenContext , Rules . IsObjectContext ) , RuleAction . Delete ) ) ;
291295
292296 // Insert new line after { and before } in multi-line contexts.
@@ -414,7 +418,7 @@ namespace ts.formatting {
414418 this . SpaceAfterPostdecrementWhenFollowedBySubtract ,
415419 this . SpaceAfterSubtractWhenFollowedByUnaryMinus , this . SpaceAfterSubtractWhenFollowedByPredecrement ,
416420 this . NoSpaceAfterCloseBrace ,
417- this . SpaceAfterOpenBrace , this . SpaceBeforeCloseBrace , this . NewLineBeforeCloseBraceInBlockContext ,
421+ this . NewLineBeforeCloseBraceInBlockContext ,
418422 this . SpaceAfterCloseBrace , this . SpaceBetweenCloseBraceAndElse , this . SpaceBetweenCloseBraceAndWhile , this . NoSpaceBetweenEmptyBraceBrackets ,
419423 this . NoSpaceBetweenFunctionKeywordAndStar , this . SpaceAfterStarInGeneratorDeclaration ,
420424 this . SpaceAfterFunctionInFuncDecl , this . NewLineAfterOpenBraceInBlockContext , this . SpaceAfterGetSetInMember ,
0 commit comments