remove IIFE on class declarations #288
This commit is contained in:
@@ -13,33 +13,29 @@ var _extends = function (child, parent) {
|
||||
child.__proto__ = parent;
|
||||
};
|
||||
|
||||
var Test = (function (Foo) {
|
||||
var Test = function Test() {
|
||||
woops["super"].test();
|
||||
Foo.call(this);
|
||||
Foo.prototype.test.call(this);
|
||||
foob(Foo);
|
||||
var Test = function Test() {
|
||||
woops["super"].test();
|
||||
Foo.call(this);
|
||||
Foo.prototype.test.call(this);
|
||||
foob(Foo);
|
||||
|
||||
Foo.call.apply(Foo, [this].concat(_slice.call(arguments)));
|
||||
Foo.call.apply(Foo, [this, "test"].concat(_slice.call(arguments)));
|
||||
Foo.call.apply(Foo, [this].concat(_slice.call(arguments)));
|
||||
Foo.call.apply(Foo, [this, "test"].concat(_slice.call(arguments)));
|
||||
|
||||
Foo.prototype.test.call.apply(Foo.prototype, [this].concat(_slice.call(arguments)));
|
||||
Foo.prototype.test.call.apply(Foo.prototype, [this, "test"].concat(_slice.call(arguments)));
|
||||
};
|
||||
Foo.prototype.test.call.apply(Foo.prototype, [this].concat(_slice.call(arguments)));
|
||||
Foo.prototype.test.call.apply(Foo.prototype, [this, "test"].concat(_slice.call(arguments)));
|
||||
};
|
||||
|
||||
_extends(Test, Foo);
|
||||
_extends(Test, Foo);
|
||||
|
||||
Test.prototype.test = function () {
|
||||
Foo.prototype.test.call(this);
|
||||
Foo.prototype.test.call.apply(Foo.prototype.test, [this].concat(_slice.call(arguments)));
|
||||
Foo.prototype.test.call.apply(Foo.prototype.test, [this, "test"].concat(_slice.call(arguments)));
|
||||
};
|
||||
Test.prototype.test = function () {
|
||||
Foo.prototype.test.call(this);
|
||||
Foo.prototype.test.call.apply(Foo.prototype.test, [this].concat(_slice.call(arguments)));
|
||||
Foo.prototype.test.call.apply(Foo.prototype.test, [this, "test"].concat(_slice.call(arguments)));
|
||||
};
|
||||
|
||||
Test.foo = function () {
|
||||
Foo.foo.call(this);
|
||||
Foo.foo.call.apply(Foo.foo, [this].concat(_slice.call(arguments)));
|
||||
Foo.foo.call.apply(Foo.foo, [this, "test"].concat(_slice.call(arguments)));
|
||||
};
|
||||
|
||||
return Test;
|
||||
})(Foo);
|
||||
Test.foo = function () {
|
||||
Foo.foo.call(this);
|
||||
Foo.foo.call.apply(Foo.foo, [this].concat(_slice.call(arguments)));
|
||||
Foo.foo.call.apply(Foo.foo, [this, "test"].concat(_slice.call(arguments)));
|
||||
};
|
||||
|
||||
@@ -12,13 +12,9 @@ var _extends = function (child, parent) {
|
||||
child.__proto__ = parent;
|
||||
};
|
||||
|
||||
var Test = (function (Foo) {
|
||||
var Test = function Test() {
|
||||
Foo.prototype.test;
|
||||
Foo.prototype.test.whatever;
|
||||
};
|
||||
var Test = function Test() {
|
||||
Foo.prototype.test;
|
||||
Foo.prototype.test.whatever;
|
||||
};
|
||||
|
||||
_extends(Test, Foo);
|
||||
|
||||
return Test;
|
||||
})(Foo);
|
||||
_extends(Test, Foo);
|
||||
|
||||
@@ -12,17 +12,13 @@ var _extends = function (child, parent) {
|
||||
child.__proto__ = parent;
|
||||
};
|
||||
|
||||
var Test = (function (Foo) {
|
||||
var Test = function Test() {
|
||||
Foo.prototype.test.whatever();
|
||||
Foo.prototype.test.call(this);
|
||||
};
|
||||
var Test = function Test() {
|
||||
Foo.prototype.test.whatever();
|
||||
Foo.prototype.test.call(this);
|
||||
};
|
||||
|
||||
_extends(Test, Foo);
|
||||
_extends(Test, Foo);
|
||||
|
||||
Test.test = function () {
|
||||
return Foo.wow.call(this);
|
||||
};
|
||||
|
||||
return Test;
|
||||
})(Foo);
|
||||
Test.test = function () {
|
||||
return Foo.wow.call(this);
|
||||
};
|
||||
|
||||
@@ -16,12 +16,8 @@ var Test = function Test() {
|
||||
this.state = "test";
|
||||
};
|
||||
|
||||
var Foo = (function (Bar) {
|
||||
var Foo = function Foo() {
|
||||
this.state = "test";
|
||||
};
|
||||
var Foo = function Foo() {
|
||||
this.state = "test";
|
||||
};
|
||||
|
||||
_extends(Foo, Bar);
|
||||
|
||||
return Foo;
|
||||
})(Bar);
|
||||
_extends(Foo, Bar);
|
||||
|
||||
@@ -5,20 +5,16 @@ var _classProps = function (child, staticProps, instanceProps) {
|
||||
if (instanceProps) Object.defineProperties(child.prototype, instanceProps);
|
||||
};
|
||||
|
||||
var Test = (function () {
|
||||
var Test = function Test() {};
|
||||
var Test = function Test() {};
|
||||
|
||||
_classProps(Test, null, {
|
||||
test: {
|
||||
get: function () {
|
||||
return 5 + 5;
|
||||
},
|
||||
set: function (val) {
|
||||
this._test = val;
|
||||
},
|
||||
enumerable: true
|
||||
}
|
||||
});
|
||||
|
||||
return Test;
|
||||
})();
|
||||
_classProps(Test, null, {
|
||||
test: {
|
||||
get: function () {
|
||||
return 5 + 5;
|
||||
},
|
||||
set: function (val) {
|
||||
this._test = val;
|
||||
},
|
||||
enumerable: true
|
||||
}
|
||||
});
|
||||
|
||||
@@ -5,17 +5,13 @@ var _classProps = function (child, staticProps, instanceProps) {
|
||||
if (instanceProps) Object.defineProperties(child.prototype, instanceProps);
|
||||
};
|
||||
|
||||
var Test = (function () {
|
||||
var Test = function Test() {};
|
||||
var Test = function Test() {};
|
||||
|
||||
_classProps(Test, null, {
|
||||
test: {
|
||||
get: function () {
|
||||
return 5 + 5;
|
||||
},
|
||||
enumerable: true
|
||||
}
|
||||
});
|
||||
|
||||
return Test;
|
||||
})();
|
||||
_classProps(Test, null, {
|
||||
test: {
|
||||
get: function () {
|
||||
return 5 + 5;
|
||||
},
|
||||
enumerable: true
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,11 +1,7 @@
|
||||
"use strict";
|
||||
|
||||
var Test = (function () {
|
||||
var Test = function Test() {};
|
||||
var Test = function Test() {};
|
||||
|
||||
Test.prototype.test = function () {
|
||||
return 5 + 5;
|
||||
};
|
||||
|
||||
return Test;
|
||||
})();
|
||||
Test.prototype.test = function () {
|
||||
return 5 + 5;
|
||||
};
|
||||
|
||||
@@ -5,17 +5,13 @@ var _classProps = function (child, staticProps, instanceProps) {
|
||||
if (instanceProps) Object.defineProperties(child.prototype, instanceProps);
|
||||
};
|
||||
|
||||
var Test = (function () {
|
||||
var Test = function Test() {};
|
||||
var Test = function Test() {};
|
||||
|
||||
_classProps(Test, null, {
|
||||
test: {
|
||||
set: function (val) {
|
||||
this._test = val;
|
||||
},
|
||||
enumerable: true
|
||||
}
|
||||
});
|
||||
|
||||
return Test;
|
||||
})();
|
||||
_classProps(Test, null, {
|
||||
test: {
|
||||
set: function (val) {
|
||||
this._test = val;
|
||||
},
|
||||
enumerable: true
|
||||
}
|
||||
});
|
||||
|
||||
@@ -5,18 +5,14 @@ var _classProps = function (child, staticProps, instanceProps) {
|
||||
if (instanceProps) Object.defineProperties(child.prototype, instanceProps);
|
||||
};
|
||||
|
||||
var A = (function () {
|
||||
var A = function A() {};
|
||||
var A = function A() {};
|
||||
|
||||
A.a = function () {};
|
||||
A.a = function () {};
|
||||
|
||||
_classProps(A, {
|
||||
b: {
|
||||
get: function () {},
|
||||
set: function (b) {},
|
||||
enumerable: true
|
||||
}
|
||||
});
|
||||
|
||||
return A;
|
||||
})();
|
||||
_classProps(A, {
|
||||
b: {
|
||||
get: function () {},
|
||||
set: function (b) {},
|
||||
enumerable: true
|
||||
}
|
||||
});
|
||||
|
||||
@@ -12,22 +12,14 @@ var _extends = function (child, parent) {
|
||||
child.__proto__ = parent;
|
||||
};
|
||||
|
||||
var BaseController = (function (Chaplin) {
|
||||
var BaseController = function BaseController() {
|
||||
Chaplin.Controller.apply(this, arguments);
|
||||
};
|
||||
var BaseController = function BaseController() {
|
||||
Chaplin.Controller.apply(this, arguments);
|
||||
};
|
||||
|
||||
_extends(BaseController, Chaplin.Controller);
|
||||
_extends(BaseController, Chaplin.Controller);
|
||||
|
||||
return BaseController;
|
||||
})(Chaplin);
|
||||
var BaseController2 = function BaseController2() {
|
||||
Chaplin.Controller.Another.apply(this, arguments);
|
||||
};
|
||||
|
||||
var BaseController2 = (function (Chaplin) {
|
||||
var BaseController2 = function BaseController2() {
|
||||
Chaplin.Controller.Another.apply(this, arguments);
|
||||
};
|
||||
|
||||
_extends(BaseController2, Chaplin.Controller.Another);
|
||||
|
||||
return BaseController2;
|
||||
})(Chaplin);
|
||||
_extends(BaseController2, Chaplin.Controller.Another);
|
||||
|
||||
@@ -12,12 +12,10 @@ var _extends = function (child, parent) {
|
||||
child.__proto__ = parent;
|
||||
};
|
||||
|
||||
var Q = (function (_ref) {
|
||||
var Q = function Q() {
|
||||
_ref.apply(this, arguments);
|
||||
};
|
||||
var _QSuper = function () {};
|
||||
|
||||
_extends(Q, _ref);
|
||||
var Q = function Q() {
|
||||
_QSuper.apply(this, arguments);
|
||||
};
|
||||
|
||||
return Q;
|
||||
})(function () {});
|
||||
_extends(Q, _QSuper);
|
||||
|
||||
@@ -12,12 +12,8 @@ var _extends = function (child, parent) {
|
||||
child.__proto__ = parent;
|
||||
};
|
||||
|
||||
var Test = (function (Foo) {
|
||||
var Test = function Test() {
|
||||
Foo.apply(this, arguments);
|
||||
};
|
||||
var Test = function Test() {
|
||||
Foo.apply(this, arguments);
|
||||
};
|
||||
|
||||
_extends(Test, Foo);
|
||||
|
||||
return Test;
|
||||
})(Foo);
|
||||
_extends(Test, Foo);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
"use strict";
|
||||
|
||||
var string = "foo\ud83d\udca9bar";
|
||||
var string = "foo💩bar";
|
||||
var match = string.match(/foo((?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uDC00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF]))bar/);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
"use strict";
|
||||
|
||||
var string = "foo\ud83d\udca9bar";
|
||||
var string = "foo💩bar";
|
||||
var match = string.match(/foo(.)bar/);
|
||||
|
||||
@@ -5,32 +5,28 @@ var _classProps = function (child, staticProps, instanceProps) {
|
||||
if (instanceProps) Object.defineProperties(child.prototype, instanceProps);
|
||||
};
|
||||
|
||||
var Foo = (function () {
|
||||
var Foo = function Foo() {};
|
||||
var Foo = function Foo() {};
|
||||
|
||||
_classProps(Foo, null, (function (_ref) {
|
||||
_ref[bar] = {
|
||||
get: function () {
|
||||
if (this._memoDone) return this._memo;
|
||||
this._memoDone = true;
|
||||
return this._memo = complex();
|
||||
},
|
||||
enumerable: true
|
||||
};
|
||||
return _ref;
|
||||
})({
|
||||
bar: {
|
||||
get: function () {
|
||||
if (this._barDone) return this._bar;
|
||||
this._barDone = true;
|
||||
return this._bar = complex();
|
||||
},
|
||||
enumerable: true
|
||||
}
|
||||
}));
|
||||
|
||||
return Foo;
|
||||
})();
|
||||
_classProps(Foo, null, (function (_ref) {
|
||||
_ref[bar] = {
|
||||
get: function () {
|
||||
if (this._memoDone) return this._memo;
|
||||
this._memoDone = true;
|
||||
return this._memo = complex();
|
||||
},
|
||||
enumerable: true
|
||||
};
|
||||
return _ref;
|
||||
})({
|
||||
bar: {
|
||||
get: function () {
|
||||
if (this._barDone) return this._bar;
|
||||
this._barDone = true;
|
||||
return this._bar = complex();
|
||||
},
|
||||
enumerable: true
|
||||
}
|
||||
}));
|
||||
|
||||
var foo = (function (_foo) {
|
||||
_foo[bar] = function () {
|
||||
|
||||
@@ -5,20 +5,16 @@ var _classProps = function (child, staticProps, instanceProps) {
|
||||
if (instanceProps) Object.defineProperties(child.prototype, instanceProps);
|
||||
};
|
||||
|
||||
var Test = (function () {
|
||||
var Test = function Test() {};
|
||||
var Test = function Test() {};
|
||||
|
||||
_classProps(Test, null, {
|
||||
bar: {
|
||||
get: function () {
|
||||
throw new Error("wow");
|
||||
},
|
||||
enumerable: true
|
||||
}
|
||||
});
|
||||
|
||||
return Test;
|
||||
})();
|
||||
_classProps(Test, null, {
|
||||
bar: {
|
||||
get: function () {
|
||||
throw new Error("wow");
|
||||
},
|
||||
enumerable: true
|
||||
}
|
||||
});
|
||||
|
||||
var test = new Test();
|
||||
test.bar;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
"column": 10
|
||||
},
|
||||
"generated": {
|
||||
"line": 14,
|
||||
"column": 15
|
||||
"line": 13,
|
||||
"column": 13
|
||||
}
|
||||
}]
|
||||
|
||||
Reference in New Issue
Block a user