@@ -846,46 +846,43 @@ impl<'a> Gen for ExportNamedDeclaration<'a> {
846
846
if self . export_kind . is_type ( ) {
847
847
p. print_str ( "type " ) ;
848
848
}
849
- match & self . declaration {
850
- Some ( decl) => {
851
- match decl {
852
- Declaration :: VariableDeclaration ( decl) => decl. print ( p, ctx) ,
853
- Declaration :: FunctionDeclaration ( decl) => decl. print ( p, ctx) ,
854
- Declaration :: ClassDeclaration ( decl) => decl. print ( p, ctx) ,
855
- Declaration :: TSModuleDeclaration ( decl) => decl. print ( p, ctx) ,
856
- Declaration :: TSTypeAliasDeclaration ( decl) => decl. print ( p, ctx) ,
857
- Declaration :: TSInterfaceDeclaration ( decl) => decl. print ( p, ctx) ,
858
- Declaration :: TSEnumDeclaration ( decl) => decl. print ( p, ctx) ,
859
- Declaration :: TSImportEqualsDeclaration ( decl) => decl. print ( p, ctx) ,
860
- }
861
- if matches ! (
862
- decl,
863
- Declaration :: VariableDeclaration ( _)
864
- | Declaration :: TSTypeAliasDeclaration ( _)
865
- | Declaration :: TSImportEqualsDeclaration ( _)
866
- ) {
867
- p. print_semicolon_after_statement ( ) ;
868
- } else {
869
- p. print_soft_newline ( ) ;
870
- p. needs_semicolon = false ;
871
- }
872
- }
873
- None => {
874
- p. print_ascii_byte ( b'{' ) ;
875
- if !self . specifiers . is_empty ( ) {
876
- p. print_soft_space ( ) ;
877
- p. print_list ( & self . specifiers , ctx) ;
878
- p. print_soft_space ( ) ;
879
- }
880
- p. print_ascii_byte ( b'}' ) ;
881
- if let Some ( source) = & self . source {
882
- p. print_soft_space ( ) ;
883
- p. print_str ( "from" ) ;
884
- p. print_soft_space ( ) ;
885
- source. print ( p, ctx) ;
886
- }
849
+ if let Some ( decl) = & self . declaration {
850
+ match decl {
851
+ Declaration :: VariableDeclaration ( decl) => decl. print ( p, ctx) ,
852
+ Declaration :: FunctionDeclaration ( decl) => decl. print ( p, ctx) ,
853
+ Declaration :: ClassDeclaration ( decl) => decl. print ( p, ctx) ,
854
+ Declaration :: TSModuleDeclaration ( decl) => decl. print ( p, ctx) ,
855
+ Declaration :: TSTypeAliasDeclaration ( decl) => decl. print ( p, ctx) ,
856
+ Declaration :: TSInterfaceDeclaration ( decl) => decl. print ( p, ctx) ,
857
+ Declaration :: TSEnumDeclaration ( decl) => decl. print ( p, ctx) ,
858
+ Declaration :: TSImportEqualsDeclaration ( decl) => decl. print ( p, ctx) ,
859
+ }
860
+ if matches ! (
861
+ decl,
862
+ Declaration :: VariableDeclaration ( _)
863
+ | Declaration :: TSTypeAliasDeclaration ( _)
864
+ | Declaration :: TSImportEqualsDeclaration ( _)
865
+ ) {
887
866
p. print_semicolon_after_statement ( ) ;
867
+ } else {
868
+ p. print_soft_newline ( ) ;
869
+ p. needs_semicolon = false ;
870
+ }
871
+ } else {
872
+ p. print_ascii_byte ( b'{' ) ;
873
+ if !self . specifiers . is_empty ( ) {
874
+ p. print_soft_space ( ) ;
875
+ p. print_list ( & self . specifiers , ctx) ;
876
+ p. print_soft_space ( ) ;
888
877
}
878
+ p. print_ascii_byte ( b'}' ) ;
879
+ if let Some ( source) = & self . source {
880
+ p. print_soft_space ( ) ;
881
+ p. print_str ( "from" ) ;
882
+ p. print_soft_space ( ) ;
883
+ source. print ( p, ctx) ;
884
+ }
885
+ p. print_semicolon_after_statement ( ) ;
889
886
}
890
887
}
891
888
}
0 commit comments