Skip to content

Commit

Permalink
improve
Browse files Browse the repository at this point in the history
  • Loading branch information
liuxingbaoyu committed Mar 7, 2024
1 parent 4dd88ea commit ac1ff4b
Show file tree
Hide file tree
Showing 264 changed files with 415 additions and 634 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@ var Test = /*#__PURE__*/function () {
function Test() {
babelHelpers.classCallCheck(this, Test);
}
babelHelpers.createClass(Test, [{
return babelHelpers.createClass(Test, [{
key: "bar",
get: function () {
throw new Error("wow");
}
}]);
return Test;
}();
var test = new Test();
test.bar;
Original file line number Diff line number Diff line change
Expand Up @@ -37,22 +37,25 @@
(1:10-12) Test { <-- (6:2-3) }
^^ ^

(1:10-12) Test { <-- (7:2-14) babelHelpers.cre
^^ ^^^^^^^^^^^^
(1:10-12) Test { <-- (7:2-9) return babe
^^ ^^^^^^^

(1:10-12) Test { <-- (7:14-15) pers.crea
(1:10-12) Test { <-- (7:9-21) urn babelHelpers.cre
^^ ^^^^^^^^^^^^

(1:10-12) Test { <-- (7:21-22) pers.crea
^^ ^

(1:10-12) Test { <-- (7:15-26) ers.createClass(Tes
(1:10-12) Test { <-- (7:22-33) ers.createClass(Tes
^^ ^^^^^^^^^^^

(1:10-12) Test { <-- (7:26-27) lass(Test
(1:10-12) Test { <-- (7:33-34) lass(Test
^^ ^

(1:10-12) Test { <-- (7:27-31) ass(Test, [{
(1:10-12) Test { <-- (7:34-38) ass(Test, [{
^^ ^^^^

(1:10-12) Test { <-- (7:31-35) Test, [{
(1:10-12) Test { <-- (7:38-42) Test, [{
^^ ^^^^

(1:10-12) Test { <-- (8:4-7) key: "b
Expand Down Expand Up @@ -106,50 +109,41 @@
(4:3-3) } <-- (12:2-6) }]);
>< ^^^^

(4:3-3) } <-- (13:2-9) return Test
>< ^^^^^^^

(4:3-3) } <-- (13:9-13) urn Test;
>< ^^^^

(4:3-3) } <-- (13:13-14) Test;
>< ^

(4:3-3) } <-- (14:0-4) }();
(4:3-3) } <-- (13:0-4) }();
>< ^^^^

(7:0-4) var test <-- (15:0-4) var test
(7:0-4) var test <-- (14:0-4) var test
^^^^ ^^^^

(7:4-8) var test = n <-- (15:4-8) var test = n
(7:4-8) var test = n <-- (14:4-8) var test = n
^^^^ ^^^^

(7:8-11) test = new <-- (15:8-11) test = new
(7:8-11) test = new <-- (14:8-11) test = new
^^^ ^^^

(7:11-15) t = new Test <-- (15:11-15) t = new Test
(7:11-15) t = new Test <-- (14:11-15) t = new Test
^^^^ ^^^^

(7:15-19) new Test; <-- (15:15-19) new Test();
(7:15-19) new Test; <-- (14:15-19) new Test();
^^^^ ^^^^

(7:19-19) Test; <-- (15:19-20) Test();
(7:19-19) Test; <-- (14:19-20) Test();
>< ^

(7:18-19) Test; <-- (15:20-21) est();
(7:18-19) Test; <-- (14:20-21) est();
^ ^

(7:19-20) Test; <-- (15:21-22) st();
(7:19-20) Test; <-- (14:21-22) st();
^ ^

(8:0-4) test.bar <-- (16:0-4) test.bar
(8:0-4) test.bar <-- (15:0-4) test.bar
^^^^ ^^^^

(8:4-5) test.bar; <-- (16:4-5) test.bar;
(8:4-5) test.bar; <-- (15:4-5) test.bar;
^ ^

(8:5-8) est.bar; <-- (16:5-8) est.bar;
(8:5-8) est.bar; <-- (15:5-8) est.bar;
^^^ ^^^

(8:8-9) .bar; <-- (16:8-9) .bar;
(8:8-9) .bar; <-- (15:8-9) .bar;
^ ^
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
"sourcesContent": [
"class Test {\n get bar() {\n throw new Error(\"wow\");\n }\n}\n\nvar test = new Test;\ntest.bar;"
],
"mappings": "IAAMA,IAAI;EAAA;;EAAA,SAAAA,KAAA;IAAAC,YAAA,CAAAC,cAAA,OAAAF,IAAA;EAAA;EAAAC,YAAA,CAAAE,WAAA,CAAAH,IAAA;IAAAI,GAAA;IAAAC,GAAA,EACR,SAAAA,CAAA,EAAU;MACR,MAAM,IAAIC,KAAK,CAAC,KAAK,CAAC;IACxB;EAAC;EAAA,OAAAN,IAAA;AAAA;AAGH,IAAIO,IAAI,GAAG,IAAIP,IAAI,CAAD,CAAC;AACnBO,IAAI,CAACC,GAAG",
"mappings": "IAAMA,IAAI;EAAA;;EAAA,SAAAA,KAAA;IAAAC,YAAA,CAAAC,cAAA,OAAAF,IAAA;EAAA;EAAA,OAAAC,YAAA,CAAAE,WAAA,CAAAH,IAAA;IAAAI,GAAA;IAAAC,GAAA,EACR,SAAAA,CAAA,EAAU;MACR,MAAM,IAAIC,KAAK,CAAC,KAAK,CAAC;IACxB;EAAC;AAAA;AAGH,IAAIC,IAAI,GAAG,IAAIP,IAAI,CAAD,CAAC;AACnBO,IAAI,CAACC,GAAG",
"ignoreList": []
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ let Foo = /*#__PURE__*/function () {
function Foo() {
_classCallCheck(this, Foo);
}
babelHelpers.createClass(Foo, [{
return babelHelpers.createClass(Foo, [{
key: "method",
value: function method() {}
}]);
return Foo;
}();
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ function generateAsyncAction(type) {
var A = /*#__PURE__*/function (_B) {
"use strict";

babelHelpers.inherits(A, _B);
function A(timestamp) {
var _this;
babelHelpers.classCallCheck(this, A);
Expand All @@ -21,5 +20,6 @@ var A = /*#__PURE__*/function (_B) {
_this.moment = moment(timestamp);
return _this;
}
babelHelpers.inherits(A, _B);
return babelHelpers.createClass(A);
}(B);
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ let Test1 = /*#__PURE__*/function () {
function Test1() {
babelHelpers.classCallCheck(this, Test1);
}
babelHelpers.createClass(Test1, [{
return babelHelpers.createClass(Test1, [{
key: "one",
value: function one() {
_two.call(_one, 1, 2);
Expand All @@ -17,5 +17,4 @@ let Test1 = /*#__PURE__*/function () {
_two.call(_one, 1, 2);
}
}]);
return Test1;
}();
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
var Child = /*#__PURE__*/function (_Parent) {
"use strict";

babelHelpers.inherits(Child, _Parent);
function Child() {
var _this;
babelHelpers.classCallCheck(this, Child);
Expand All @@ -11,5 +10,6 @@ var Child = /*#__PURE__*/function (_Parent) {
};
return _this;
}
babelHelpers.inherits(Child, _Parent);
return babelHelpers.createClass(Child);
}(Parent);
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@ let A = (_class = (_Symbol$search = Symbol.search, /*#__PURE__*/function () {
babelHelpers.classCallCheck(this, A);
babelHelpers.initializerDefineProperty(this, "a", _descriptor, this);
}
babelHelpers.createClass(A, [{
return babelHelpers.createClass(A, [{
key: _Symbol$search,
value: function () {}
}]);
return A;
}()), (_descriptor = babelHelpers.applyDecoratedDescriptor(_class.prototype, "a", [dec], {
configurable: true,
enumerable: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ let Hello = /*#__PURE__*/babelHelpers.createClass(function Hello() {
return () => () => "hello";
});
let Outer = /*#__PURE__*/function (_Hello) {
babelHelpers.inherits(Outer, _Hello);
function Outer() {
let _ref;
var _helloDecs, _init_hello, _init_extra_hello, _Inner;
Expand All @@ -21,6 +20,7 @@ let Outer = /*#__PURE__*/function (_Hello) {
[_init_hello, _init_extra_hello] = babelHelpers.applyDecs2311(_Inner, [], [[_helloDecs, 0, "hello"]]).e;
return babelHelpers.possibleConstructorReturn(_this, new Inner());
}
babelHelpers.inherits(Outer, _Hello);
return babelHelpers.createClass(Outer);
}(Hello);
expect(new Outer().hello).toBe('hello');
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ let Hello = /*#__PURE__*/babelHelpers.createClass(function Hello() {
};
});
let Outer = /*#__PURE__*/function (_Hello) {
babelHelpers.inherits(Outer, _Hello);
function Outer() {
var _this;
babelHelpers.classCallCheck(this, Outer);
Expand All @@ -20,6 +19,7 @@ let Outer = /*#__PURE__*/function (_Hello) {
});
return babelHelpers.possibleConstructorReturn(_this, new Inner());
}
babelHelpers.inherits(Outer, _Hello);
return babelHelpers.createClass(Outer);
}(Hello);
expect(new Outer().hello).toBe('hello');
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,14 @@ let Hello = /*#__PURE__*/function () {
function Hello() {
babelHelpers.classCallCheck(this, Hello);
}
babelHelpers.createClass(Hello, [{
return babelHelpers.createClass(Hello, [{
key: "toString",
value: function toString() {
return 'hello';
}
}]);
return Hello;
}();
let Outer = /*#__PURE__*/function (_Hello) {
babelHelpers.inherits(Outer, _Hello);
function Outer() {
let _computedKey;
var _thisSuper, _this;
Expand All @@ -26,7 +24,7 @@ let Outer = /*#__PURE__*/function (_Hello) {
babelHelpers.classCallCheck(this, Inner);
babelHelpers.classPrivateFieldInitSpec(this, _A, 'hello');
}
babelHelpers.createClass(Inner, [{
return babelHelpers.createClass(Inner, [{
key: _computedKey4,
get: function () {
return babelHelpers.classPrivateFieldGet2(_A, this);
Expand All @@ -37,10 +35,10 @@ let Outer = /*#__PURE__*/function (_Hello) {
babelHelpers.classPrivateFieldSet2(_A, this, v);
}
}]);
return Inner;
}(_computedKey, _computedKey);
return babelHelpers.possibleConstructorReturn(_this, new Inner());
}
babelHelpers.inherits(Outer, _Hello);
return babelHelpers.createClass(Outer);
}(Hello);
expect(new Outer().hello).toBe('hello');
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,14 @@ let Hello = /*#__PURE__*/function () {
function Hello() {
babelHelpers.classCallCheck(this, Hello);
}
babelHelpers.createClass(Hello, [{
return babelHelpers.createClass(Hello, [{
key: "dec",
value: function dec() {
return () => "hello";
}
}]);
return Hello;
}();
let Outer = /*#__PURE__*/function (_Hello) {
babelHelpers.inherits(Outer, _Hello);
function Outer() {
var _init_hello, _init_extra_hello, _Inner;
var _thisSuper, _this;
Expand All @@ -28,6 +26,7 @@ let Outer = /*#__PURE__*/function (_Hello) {
[_init_hello, _init_extra_hello] = babelHelpers.applyDecs2311(_Inner, [], [[babelHelpers.get((_thisSuper = babelHelpers.assertThisInitialized(_this), babelHelpers.getPrototypeOf(Outer.prototype)), "dec", _thisSuper), 0, "hello"]]).e;
return babelHelpers.possibleConstructorReturn(_this, new Inner());
}
babelHelpers.inherits(Outer, _Hello);
return babelHelpers.createClass(Outer);
}(Hello);
expect(new Outer().hello).toBe('hello');
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,14 @@ let Hello = /*#__PURE__*/function () {
function Hello() {
babelHelpers.classCallCheck(this, Hello);
}
babelHelpers.createClass(Hello, [{
return babelHelpers.createClass(Hello, [{
key: "toString",
value: function toString() {
return 'hello';
}
}]);
return Hello;
}();
let Outer = /*#__PURE__*/function (_Hello) {
babelHelpers.inherits(Outer, _Hello);
function Outer() {
let _babelHelpers$get$cal;
var _thisSuper, _this;
Expand All @@ -26,6 +24,7 @@ let Outer = /*#__PURE__*/function (_Hello) {
});
return babelHelpers.possibleConstructorReturn(_this, new Inner());
}
babelHelpers.inherits(Outer, _Hello);
return babelHelpers.createClass(Outer);
}(Hello);
expect(new Outer().hello).toBe('hello');
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ var Foo = /*#__PURE__*/function () {
value: 0
});
}
babelHelpers.createClass(Foo, [{
return babelHelpers.createClass(Foo, [{
key: "test",
value: function test(other) {
babelHelpers.classPrivateFieldLooseBase(this, _foo)[_foo] += 1;
Expand All @@ -18,5 +18,4 @@ var Foo = /*#__PURE__*/function () {
babelHelpers.classPrivateFieldLooseBase(other.obj, _foo)[_foo] = 2;
}
}]);
return Foo;
}();
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,11 @@ var Foo = /*#__PURE__*/function () {
}
});
}
babelHelpers.createClass(Foo, [{
return babelHelpers.createClass(Foo, [{
key: "test",
value: function test(other) {
babelHelpers.classPrivateFieldLooseBase(this, _foo)[_foo]();
babelHelpers.classPrivateFieldLooseBase(other.obj, _foo)[_foo]();
}
}]);
return Foo;
}();
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ var Point = /*#__PURE__*/function () {
babelHelpers.classPrivateFieldLooseBase(this, _x)[_x] = +x;
babelHelpers.classPrivateFieldLooseBase(this, _y)[_y] = +y;
}
babelHelpers.createClass(Point, [{
return babelHelpers.createClass(Point, [{
key: "x",
get: function () {
return babelHelpers.classPrivateFieldLooseBase(this, _x)[_x];
Expand All @@ -43,5 +43,4 @@ var Point = /*#__PURE__*/function () {
return `Point<${babelHelpers.classPrivateFieldLooseBase(this, _x)[_x]},${babelHelpers.classPrivateFieldLooseBase(this, _y)[_y]}>`;
}
}]);
return Point;
}();
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ var _bar = /*#__PURE__*/babelHelpers.classPrivateFieldLooseKey("bar");
var Foo = /*#__PURE__*/function (_Bar) {
"use strict";

babelHelpers.inherits(Foo, _Bar);
function Foo() {
var _this;
babelHelpers.classCallCheck(this, Foo);
Expand All @@ -21,5 +20,6 @@ var Foo = /*#__PURE__*/function (_Bar) {
}
return babelHelpers.possibleConstructorReturn(_this);
}
babelHelpers.inherits(Foo, _Bar);
return babelHelpers.createClass(Foo);
}(Bar);
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ var _prop2 = /*#__PURE__*/babelHelpers.classPrivateFieldLooseKey("prop");
var Bar = /*#__PURE__*/function (_Foo2) {
"use strict";

babelHelpers.inherits(Bar, _Foo2);
function Bar(...args) {
var _this;
babelHelpers.classCallCheck(this, Bar);
Expand All @@ -23,5 +22,6 @@ var Bar = /*#__PURE__*/function (_Foo2) {
});
return _this;
}
babelHelpers.inherits(Bar, _Foo2);
return babelHelpers.createClass(Bar);
}(Foo);

0 comments on commit ac1ff4b

Please sign in to comment.