forked from babel/babel
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make special case for class property initializers in `shadow-function…
…s` (babel#4502)
- Loading branch information
1 parent
4776e78
commit 119079a
Showing
4 changed files
with
34 additions
and
7 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
10 changes: 10 additions & 0 deletions
10
...core/test/fixtures/transformation/misc/class-property-initializer-blocks-shadow/actual.js
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,10 @@ | ||
class A { | ||
prop1 = () => this; | ||
static prop2 = () => this; | ||
prop3 = () => arguments; | ||
static prop4 = () => arguments; | ||
prop5 = this; | ||
static prop6 = this; | ||
prop7 = arguments; | ||
static prop8 = arguments; | ||
} |
10 changes: 10 additions & 0 deletions
10
...re/test/fixtures/transformation/misc/class-property-initializer-blocks-shadow/expected.js
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,10 @@ | ||
class A { | ||
prop1 = () => this; | ||
static prop2 = () => this; | ||
prop3 = () => arguments; | ||
static prop4 = () => arguments; | ||
prop5 = this; | ||
static prop6 = this; | ||
prop7 = arguments; | ||
static prop8 = arguments; | ||
} |
3 changes: 3 additions & 0 deletions
3
...e/test/fixtures/transformation/misc/class-property-initializer-blocks-shadow/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": ["syntax-class-properties"] | ||
} |