Move decorators transform to @babel/helper-create-class-features-plugin (#9059)

* Move decorators to @babel/plugin-class-features

* Minor refactoring

* Use the new helper package
This commit is contained in:
Nicolò Ribaudo
2018-12-09 12:30:25 +01:00
committed by GitHub
parent 9b005dedfd
commit d1d3c823cc
9 changed files with 285 additions and 307 deletions

View File

@@ -1,5 +1,3 @@
var _class;
class MyClass {
constructor() {
var _this = this;
@@ -22,7 +20,7 @@ class MyClass {
var _myAsyncMethod = new WeakMap();
_class = class MyClass2 {
(class MyClass2 {
constructor() {
var _this2 = this;
@@ -40,7 +38,7 @@ _class = class MyClass2 {
});
}
};
});
var _myAsyncMethod2 = new WeakMap();

View File

@@ -1,4 +1,4 @@
var _class, _descriptor, _class2, _Symbol$search, _temp;
var _class, _descriptor, _Symbol$search, _temp;
function _initializerDefineProperty(target, property, descriptor, context) { if (!descriptor) return; Object.defineProperty(target, property, { enumerable: descriptor.enumerable, configurable: descriptor.configurable, writable: descriptor.writable, value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 }); }
@@ -14,7 +14,7 @@ function _initializerWarningHelper(descriptor, context) { throw new Error('Decor
function dec() {}
let A = (_class = (_temp = (_Symbol$search = Symbol.search, _class2 =
let A = (_class = (_temp = (_Symbol$search = Symbol.search,
/*#__PURE__*/
function () {
"use strict";