* #7349 - Add "use strict" directive to transformed class bodies * Update tests (#7349) * Add test for program with use strict directive (#7349) * Update tests (#7349) * Update source mapping (#7349) * Add test for parent blockStatement with use strict directive (#7349) * Update tests (#7349) * Update tests (#7349) * Update tests (#7349) * Add test for constructor-only class (#7349) * Constructor only classes are strict, too But constructor only that use non-simple parameters must use a strict function wrapper. * Fix test * Wrapper not needed if class is already strict * Revert change to lerna.json
140 lines
2.9 KiB
JavaScript
140 lines
2.9 KiB
JavaScript
var TestEmpty =
|
|
/*#__PURE__*/
|
|
function (_ref) {
|
|
"use strict";
|
|
|
|
babelHelpers.inherits(TestEmpty, _ref);
|
|
|
|
function TestEmpty() {
|
|
babelHelpers.classCallCheck(this, TestEmpty);
|
|
return babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(TestEmpty).apply(this, arguments));
|
|
}
|
|
|
|
return TestEmpty;
|
|
}(
|
|
/*#__PURE__*/
|
|
function () {
|
|
"use strict";
|
|
|
|
function _class() {
|
|
babelHelpers.classCallCheck(this, _class);
|
|
}
|
|
|
|
return _class;
|
|
}());
|
|
|
|
var TestConstructorOnly =
|
|
/*#__PURE__*/
|
|
function (_ref2) {
|
|
"use strict";
|
|
|
|
babelHelpers.inherits(TestConstructorOnly, _ref2);
|
|
|
|
function TestConstructorOnly() {
|
|
babelHelpers.classCallCheck(this, TestConstructorOnly);
|
|
return babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(TestConstructorOnly).apply(this, arguments));
|
|
}
|
|
|
|
return TestConstructorOnly;
|
|
}(
|
|
/*#__PURE__*/
|
|
function () {
|
|
"use strict";
|
|
|
|
function _class2() {
|
|
babelHelpers.classCallCheck(this, _class2);
|
|
}
|
|
|
|
return _class2;
|
|
}());
|
|
|
|
var TestMethodOnly =
|
|
/*#__PURE__*/
|
|
function (_ref3) {
|
|
"use strict";
|
|
|
|
babelHelpers.inherits(TestMethodOnly, _ref3);
|
|
|
|
function TestMethodOnly() {
|
|
babelHelpers.classCallCheck(this, TestMethodOnly);
|
|
return babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(TestMethodOnly).apply(this, arguments));
|
|
}
|
|
|
|
return TestMethodOnly;
|
|
}(
|
|
/*#__PURE__*/
|
|
function () {
|
|
"use strict";
|
|
|
|
function _class3() {
|
|
babelHelpers.classCallCheck(this, _class3);
|
|
}
|
|
|
|
babelHelpers.createClass(_class3, [{
|
|
key: "method",
|
|
value: function method() {}
|
|
}]);
|
|
return _class3;
|
|
}());
|
|
|
|
var TestConstructorAndMethod =
|
|
/*#__PURE__*/
|
|
function (_ref4) {
|
|
"use strict";
|
|
|
|
babelHelpers.inherits(TestConstructorAndMethod, _ref4);
|
|
|
|
function TestConstructorAndMethod() {
|
|
babelHelpers.classCallCheck(this, TestConstructorAndMethod);
|
|
return babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(TestConstructorAndMethod).apply(this, arguments));
|
|
}
|
|
|
|
return TestConstructorAndMethod;
|
|
}(
|
|
/*#__PURE__*/
|
|
function () {
|
|
"use strict";
|
|
|
|
function _class4() {
|
|
babelHelpers.classCallCheck(this, _class4);
|
|
}
|
|
|
|
babelHelpers.createClass(_class4, [{
|
|
key: "method",
|
|
value: function method() {}
|
|
}]);
|
|
return _class4;
|
|
}());
|
|
|
|
var TestMultipleMethods =
|
|
/*#__PURE__*/
|
|
function (_ref5) {
|
|
"use strict";
|
|
|
|
babelHelpers.inherits(TestMultipleMethods, _ref5);
|
|
|
|
function TestMultipleMethods() {
|
|
babelHelpers.classCallCheck(this, TestMultipleMethods);
|
|
return babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(TestMultipleMethods).apply(this, arguments));
|
|
}
|
|
|
|
return TestMultipleMethods;
|
|
}(
|
|
/*#__PURE__*/
|
|
function () {
|
|
"use strict";
|
|
|
|
function _class5() {
|
|
babelHelpers.classCallCheck(this, _class5);
|
|
}
|
|
|
|
babelHelpers.createClass(_class5, [{
|
|
key: "m1",
|
|
value: function m1() {}
|
|
}, {
|
|
key: "m2",
|
|
value: function m2() {}
|
|
}]);
|
|
return _class5;
|
|
}());
|