Add /*#__PURE__*/ annotatiotion for babel-plugin-async-to-generator. Fixes #6572
This commit is contained in:
@@ -2,7 +2,9 @@ class MyClass {
|
||||
constructor() {
|
||||
var _this = this;
|
||||
|
||||
this.myAsyncMethod = babelHelpers.asyncToGenerator(function* () {
|
||||
this.myAsyncMethod =
|
||||
/*#__PURE__*/
|
||||
babelHelpers.asyncToGenerator(function* () {
|
||||
console.log(_this);
|
||||
});
|
||||
}
|
||||
@@ -13,7 +15,9 @@ class MyClass {
|
||||
constructor() {
|
||||
var _this2 = this;
|
||||
|
||||
this.myAsyncMethod = babelHelpers.asyncToGenerator(function* () {
|
||||
this.myAsyncMethod =
|
||||
/*#__PURE__*/
|
||||
babelHelpers.asyncToGenerator(function* () {
|
||||
console.log(_this2);
|
||||
});
|
||||
}
|
||||
@@ -24,7 +28,9 @@ export default class MyClass3 {
|
||||
constructor() {
|
||||
var _this3 = this;
|
||||
|
||||
this.myAsyncMethod = babelHelpers.asyncToGenerator(function* () {
|
||||
this.myAsyncMethod =
|
||||
/*#__PURE__*/
|
||||
babelHelpers.asyncToGenerator(function* () {
|
||||
console.log(_this3);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user