swc/tests/fixture/issue-1107/1/output/index.js
강동윤 949a4d9716
fix(es): Fix simple bugs (#2077)
swc_ecma_visit:
 - Ensure that #1967 is wrong. (#1967)

swc:
 - Add a test for #1107. (#1107)

node:
 - Make optional fields optional. (#1947)
2021-08-14 18:34:14 +00:00

18 lines
550 B
JavaScript

function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
}
export var Class1 = function Class1(param) {
"use strict";
var _name = param.name, name = _name === void 0 ? '' : _name;
_classCallCheck(this, Class1);
console.log(name);
};
export var Class2 = function Class2(param) {
"use strict";
var _name = param.name, name = _name === void 0 ? '' : _name;
_classCallCheck(this, Class2);
console.log(name);
};