Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
fix async arrow functions
- Loading branch information
Showing
4 changed files
with
43 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
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,6 @@ | ||
{ | ||
"plugins": [ | ||
"syntax-class-properties", | ||
"../../../../src/babel" | ||
] | ||
} |
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,5 @@ | ||
class Foo { | ||
bar = async (a, b) => { | ||
return await a(b); | ||
}; | ||
} |
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,21 @@ | ||
var _this = this; | ||
|
||
class Foo { | ||
bar = async (...params) => await _this.__bar__REACT_HOT_LOADER__(...params); | ||
|
||
async __bar__REACT_HOT_LOADER__(a, b) { | ||
return await a(b); | ||
} | ||
|
||
} | ||
; | ||
|
||
(function () { | ||
if (typeof __REACT_HOT_LOADER__ === 'undefined') { | ||
return; | ||
} | ||
|
||
__REACT_HOT_LOADER__.register(Foo, "Foo", __FILENAME__); | ||
})(); | ||
|
||
; |