File tree 4 files changed +20
-6
lines changed
tests/fixture/typescript/class_ts_constructor
swc_ecma_transforms_base/tests/ts-resolver/issues/3960/1
4 files changed +20
-6
lines changed Original file line number Diff line number Diff line change @@ -688,11 +688,9 @@ where
688
688
fn emit_ts_param_prop ( & mut self , n : & TsParamProp ) -> Result {
689
689
self . emit_leading_comments_of_span ( n. span ( ) , false ) ?;
690
690
691
- self . emit_accessibility ( n. accessibility ) ?;
691
+ self . emit_list ( n. span , Some ( & n . decorators ) , ListFormat :: Decorators ) ?;
692
692
693
- for dec in & n. decorators {
694
- emit ! ( dec) ;
695
- }
693
+ self . emit_accessibility ( n. accessibility ) ?;
696
694
697
695
if n. is_override {
698
696
keyword ! ( "override" ) ;
Original file line number Diff line number Diff line change
1
+ export class A {
2
+ constructor (
3
+ @IInstantiationService protected readonly _instantiationService : IInstantiationService ,
4
+ @IContainerService private readonly _containerService : IContainerService ,
5
+ ) {
6
+ }
7
+ }
Original file line number Diff line number Diff line change
1
+ export class A {
2
+ constructor (
3
+ @IInstantiationService
4
+ protected readonly _instantiationService : IInstantiationService ,
5
+ @IContainerService
6
+ private readonly _containerService : IContainerService ) { }
7
+ }
Original file line number Diff line number Diff line change 1
1
import { field__2 } from "../validation/decorators" ;
2
2
class C__2 {
3
- constructor ( @field__2 ( "a" )
4
- readonly field__3 : string , @field__2 ( "b" )
3
+ constructor (
4
+ @field__2 ( "a" )
5
+ readonly field__3 : string ,
6
+ @field__2 ( "b" )
5
7
readonly b__3 : string ) { }
6
8
}
You can’t perform that action at this time.
0 commit comments