|
1 | 1 | function _classCallCheck(instance, Constructor) { |
2 | | - if (!(instance instanceof Constructor)) { |
3 | | - throw new TypeError("Cannot call a class as a function"); |
4 | | - } |
| 2 | + if (!(instance instanceof Constructor)) { |
| 3 | + throw new TypeError("Cannot call a class as a function"); |
| 4 | + } |
5 | 5 | } |
| 6 | +var MyComponent = function MyComponent() { |
| 7 | + _classCallCheck(this, MyComponent); |
| 8 | +}; |
6 | 9 |
|
7 | | -function _defineProperties(target, props) { |
8 | | - for (var i = 0; i < props.length; i++) { |
9 | | - var descriptor = props[i]; |
10 | | - descriptor.enumerable = descriptor.enumerable || false; |
11 | | - descriptor.configurable = true; |
12 | | - if ("value" in descriptor) descriptor.writable = true; |
13 | | - Object.defineProperty(target, descriptor.key, descriptor); |
14 | | - } |
15 | | -} |
16 | | - |
17 | | -function _createClass(Constructor, protoProps, staticProps) { |
18 | | - if (protoProps) _defineProperties(Constructor.prototype, protoProps); |
19 | | - if (staticProps) _defineProperties(Constructor, staticProps); |
20 | | - Object.defineProperty(Constructor, "prototype", { |
21 | | - writable: false |
22 | | - }); |
23 | | - return Constructor; |
24 | | -} |
25 | | - |
26 | | -var MyComponent = /*#__PURE__*/_createClass(function MyComponent() { |
27 | | - _classCallCheck(this, MyComponent); |
28 | | -}); |
29 | | - |
30 | | -var el = /*#__PURE__*/createElement(MyComponent, { |
31 | | - type: "dummy" |
32 | | -}, /*#__PURE__*/createElement("my-element", null, "lorem ipsum", /*#__PURE__*/createElement(Fragment, null, /*#__PURE__*/createElement("mark", null, "666"), "dolor sit amet"))); |
| 10 | +var el = /*#__PURE__*/ createElement(MyComponent, { |
| 11 | + type: "dummy" |
| 12 | +}, /*#__PURE__*/ createElement("my-element", null, "lorem ipsum", /*#__PURE__*/ createElement(Fragment, null, /*#__PURE__*/ createElement("mark", null, "666"), "dolor sit amet"))); |
33 | 13 | console.log(el); |
0 commit comments