@@ -767,8 +767,8 @@ impl Gen for Function<'_> {
767
767
this_param. print ( p, ctx) ;
768
768
if !self . params . is_empty ( ) || self . params . rest . is_some ( ) {
769
769
p. print_str ( "," ) ;
770
+ p. print_soft_space ( ) ;
770
771
}
771
- p. print_soft_space ( ) ;
772
772
}
773
773
self . params . print ( p, ctx) ;
774
774
p. print_ascii_byte ( b')' ) ;
@@ -2675,6 +2675,13 @@ impl Gen for MethodDefinition<'_> {
2675
2675
type_parameters. print ( p, ctx) ;
2676
2676
}
2677
2677
p. print_ascii_byte ( b'(' ) ;
2678
+ if let Some ( this_param) = & self . value . this_param {
2679
+ this_param. print ( p, ctx) ;
2680
+ if !self . value . params . is_empty ( ) || self . value . params . rest . is_some ( ) {
2681
+ p. print_str ( "," ) ;
2682
+ p. print_soft_space ( ) ;
2683
+ }
2684
+ }
2678
2685
self . value . params . print ( p, ctx) ;
2679
2686
p. print_ascii_byte ( b')' ) ;
2680
2687
if let Some ( return_type) = & self . value . return_type {
@@ -3365,8 +3372,8 @@ impl Gen for TSFunctionType<'_> {
3365
3372
this_param. print ( p, ctx) ;
3366
3373
if !self . params . is_empty ( ) || self . params . rest . is_some ( ) {
3367
3374
p. print_str ( "," ) ;
3375
+ p. print_soft_space ( ) ;
3368
3376
}
3369
- p. print_soft_space ( ) ;
3370
3377
}
3371
3378
self . params . print ( p, ctx) ;
3372
3379
p. print_str ( ")" ) ;
@@ -3401,8 +3408,8 @@ impl Gen for TSSignature<'_> {
3401
3408
this_param. print ( p, ctx) ;
3402
3409
if !signature. params . is_empty ( ) || signature. params . rest . is_some ( ) {
3403
3410
p. print_str ( "," ) ;
3411
+ p. print_soft_space ( ) ;
3404
3412
}
3405
- p. print_soft_space ( ) ;
3406
3413
}
3407
3414
signature. params . print ( p, ctx) ;
3408
3415
p. print_str ( ")" ) ;
@@ -3460,8 +3467,8 @@ impl Gen for TSSignature<'_> {
3460
3467
this_param. print ( p, ctx) ;
3461
3468
if !signature. params . is_empty ( ) || signature. params . rest . is_some ( ) {
3462
3469
p. print_str ( "," ) ;
3470
+ p. print_soft_space ( ) ;
3463
3471
}
3464
- p. print_soft_space ( ) ;
3465
3472
}
3466
3473
signature. params . print ( p, ctx) ;
3467
3474
p. print_str ( ")" ) ;
0 commit comments