-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(es/codegen): Ensure decorators are emitted first in TS paramters (#…
- Loading branch information
1 parent
6137b89
commit 47ef38d
Showing
4 changed files
with
20 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
crates/swc_ecma_codegen/tests/fixture/typescript/class_ts_constructor/input.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
export class A { | ||
constructor( | ||
@IInstantiationService protected readonly _instantiationService: IInstantiationService, | ||
@IContainerService private readonly _containerService: IContainerService, | ||
) { | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
crates/swc_ecma_codegen/tests/fixture/typescript/class_ts_constructor/output.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
export class A { | ||
constructor( | ||
@IInstantiationService | ||
protected readonly _instantiationService: IInstantiationService, | ||
@IContainerService | ||
private readonly _containerService: IContainerService){} | ||
} |
6 changes: 4 additions & 2 deletions
6
crates/swc_ecma_transforms_base/tests/ts-resolver/issues/3960/1/output.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
import { field__2 } from "../validation/decorators"; | ||
class C__2 { | ||
constructor(@field__2("a") | ||
readonly field__3: string, @field__2("b") | ||
constructor( | ||
@field__2("a") | ||
readonly field__3: string, | ||
@field__2("b") | ||
readonly b__3: string){} | ||
} |