Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adjust TSParameterProperty handling to work with transform-parameters (…
- Loading branch information
1 parent
6059637
commit 402bd1c
Showing
4 changed files
with
20 additions
and
4 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
3 changes: 3 additions & 0 deletions
3
...n-transform-typescript/test/fixtures/class/parameter-properties-with-parameters/input.mjs
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,3 @@ | ||
export default class Example { | ||
constructor(public arg1 = null) { } | ||
} |
3 changes: 3 additions & 0 deletions
3
...ransform-typescript/test/fixtures/class/parameter-properties-with-parameters/options.json
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,3 @@ | ||
{ | ||
"plugins": ["transform-typescript", "transform-parameters"] | ||
} |
7 changes: 7 additions & 0 deletions
7
...-transform-typescript/test/fixtures/class/parameter-properties-with-parameters/output.mjs
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 default class Example { | ||
constructor() { | ||
let arg1 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; | ||
this.arg1 = arg1; | ||
} | ||
|
||
} |