forked from babel/babel
/
output.js
40 lines (40 loc) 路 1.28 KB
/
output.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// This should print "true true true"
function test() {
return _test.apply(this, arguments);
}
function _test() {
_test = babelHelpers.asyncToGenerator(function* () {
class Foo {
foo() {
return this;
}
}
class Bar extends Foo {
constructor(...args) {
var _superprop_getFoo = () => super.foo,
_this,
_superprop_get = _prop => super[_prop];
super(...args);
_this = this;
babelHelpers.defineProperty(this, "a", /*#__PURE__*/babelHelpers.asyncToGenerator(function* () {
return _superprop_getFoo().bind(_this)``;
}));
babelHelpers.defineProperty(this, "b", /*#__PURE__*/babelHelpers.asyncToGenerator(function* () {
return _superprop_get('foo').bind(_this)``;
}));
babelHelpers.defineProperty(this, "c", /*#__PURE__*/function () {
var _ref3 = babelHelpers.asyncToGenerator(function* (foo) {
return _superprop_get(foo).bind(_this)``;
});
return function (_x) {
return _ref3.apply(this, arguments);
};
}());
}
}
const bar = new Bar();
console.log((yield bar.a()) === bar, (yield bar.b()) === bar, (yield bar.c('foo')) === bar);
});
return _test.apply(this, arguments);
}
test();