Add /*#__PURE__*/ annotatiotion for babel-plugin-async-to-generator. Fixes #6572

This commit is contained in:
Satyajit Sahoo
2017-11-12 17:11:00 +05:30
parent 25bde88dff
commit 7ae6e1e5a0
48 changed files with 226 additions and 57 deletions

View File

@@ -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);
});
}