test(es): Freeze as es2015 to verify base transforms (#2468)

This commit is contained in:
Donny/강동윤 2021-10-19 14:31:12 +09:00 committed by GitHub
parent 28f2c7ae5d
commit 01e171a4b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5501 changed files with 116557 additions and 4 deletions

View File

@ -228,6 +228,7 @@ jobs:
cargo test --color always -p ${{ matrix.crate }} cargo test --color always -p ${{ matrix.crate }}
- name: Run cargo test (concurrent) - name: Run cargo test (concurrent)
if: runner.os != 'Windows'
shell: bash shell: bash
run: | run: |
./scripts/ci/test-concurrent.sh ${{ matrix.crate }} ./scripts/ci/test-concurrent.sh ${{ matrix.crate }}

2
Cargo.lock generated
View File

@ -3533,7 +3533,7 @@ checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6"
[[package]] [[package]]
name = "wasm" name = "wasm"
version = "1.2.99" version = "1.2.100"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"console_error_panic_hook", "console_error_panic_hook",

View File

@ -1,6 +1,6 @@
{ {
"name": "@swc/core", "name": "@swc/core",
"version": "1.2.99", "version": "1.2.100",
"description": "Super-fast alternative for babel", "description": "Super-fast alternative for babel",
"homepage": "https://swc.rs", "homepage": "https://swc.rs",
"main": "./index.js", "main": "./index.js",

View File

@ -0,0 +1,4 @@
// @target: ES5
// @noEmitHelpers: true
const x = (async)=>async
;

View File

@ -0,0 +1,35 @@
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
try {
var info = gen[key](arg);
var value = info.value;
} catch (error) {
reject(error);
return;
}
if (info.done) {
resolve(value);
} else {
Promise.resolve(value).then(_next, _throw);
}
}
function _asyncToGenerator(fn) {
return function() {
var self = this, args = arguments;
return new Promise(function(resolve, reject) {
var gen = fn.apply(self, args);
function _next(value) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
}
function _throw(err) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
}
_next(undefined);
});
};
}
// @target: es2017
// @noEmitHelpers: true
var foo = _asyncToGenerator(function*() {
// Legal to use 'await' in a type context.
var v;
});

View File

@ -0,0 +1,25 @@
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
try {
var info = gen[key](arg), value = info.value;
} catch (error) {
reject(error);
return;
}
info.done ? resolve(value) : Promise.resolve(value).then(_next, _throw);
}
!function(fn) {
return function() {
var self = this, args = arguments;
return new Promise(function(resolve, reject) {
var gen = fn.apply(self, args);
function _next(value) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
}
function _throw(err) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
}
_next(void 0);
});
};
}(function*() {
});

View File

@ -0,0 +1,33 @@
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
try {
var info = gen[key](arg);
var value = info.value;
} catch (error) {
reject(error);
return;
}
if (info.done) {
resolve(value);
} else {
Promise.resolve(value).then(_next, _throw);
}
}
function _asyncToGenerator(fn) {
return function() {
var self = this, args = arguments;
return new Promise(function(resolve, reject) {
var gen = fn.apply(self, args);
function _next(value) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
}
function _throw(err) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
}
_next(undefined);
});
};
}
// @target: es2017
// @noEmitHelpers: true
var foo = _asyncToGenerator(function*() {
});

View File

@ -0,0 +1,25 @@
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
try {
var info = gen[key](arg), value = info.value;
} catch (error) {
reject(error);
return;
}
info.done ? resolve(value) : Promise.resolve(value).then(_next, _throw);
}
!function(fn) {
return function() {
var self = this, args = arguments;
return new Promise(function(resolve, reject) {
var gen = fn.apply(self, args);
function _next(value) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
}
function _throw(err) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
}
_next(void 0);
});
};
}(function*() {
});

View File

@ -0,0 +1,4 @@
// @target: es2017
// @noEmitHelpers: true
var f = (_await)=>{
};

View File

@ -0,0 +1,4 @@
// @target: es2017
// @noEmitHelpers: true
function f(_await = _await) {
}

View File

@ -0,0 +1,4 @@
// @target: es2017
// @noEmitHelpers: true
var _await = ()=>{
};

View File

@ -0,0 +1,40 @@
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
try {
var info = gen[key](arg);
var value = info.value;
} catch (error) {
reject(error);
return;
}
if (info.done) {
resolve(value);
} else {
Promise.resolve(value).then(_next, _throw);
}
}
function _asyncToGenerator(fn) {
return function() {
var self = this, args = arguments;
return new Promise(function(resolve, reject) {
var gen = fn.apply(self, args);
function _next(value) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
}
function _throw(err) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
}
_next(undefined);
});
};
}
// @target: es2017
// @noEmitHelpers: true
class C {
method() {
function other() {
}
var fn = _asyncToGenerator((function*() {
return yield other.apply(this, arguments);
}).bind(this)).bind(this);
}
}

View File

@ -0,0 +1,38 @@
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
try {
var info = gen[key](arg);
var value = info.value;
} catch (error) {
reject(error);
return;
}
if (info.done) {
resolve(value);
} else {
Promise.resolve(value).then(_next, _throw);
}
}
function _asyncToGenerator(fn) {
return function() {
var self = this, args = arguments;
return new Promise(function(resolve, reject) {
var gen = fn.apply(self, args);
function _next(value) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
}
function _throw(err) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
}
_next(undefined);
});
};
}
// @target: es2017
// @noEmitHelpers: true
class C {
method() {
var fn = _asyncToGenerator((function*() {
return yield this;
}).bind(this)).bind(this);
}
}

View File

@ -0,0 +1,51 @@
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
try {
var info = gen[key](arg);
var value = info.value;
} catch (error) {
reject(error);
return;
}
if (info.done) {
resolve(value);
} else {
Promise.resolve(value).then(_next, _throw);
}
}
function _asyncToGenerator(fn) {
return function() {
var self = this, args = arguments;
return new Promise(function(resolve, reject) {
var gen = fn.apply(self, args);
function _next(value) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
}
function _throw(err) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
}
_next(undefined);
});
};
}
// @allowJs: true
// @checkJs: true
// @noEmit: true
// @target: es2017
// @filename: file.js
// Error (good)
/** @type {function(): string} */ const a = ()=>0
;
// Error (good)
/** @type {function(): string} */ const b = _asyncToGenerator(function*() {
return 0;
});
// No error (bad)
/** @type {function(): string} */ const c = _asyncToGenerator(function*() {
return 0;
});
/** @type {function(function(): string): void} */ const f = (p)=>{
};
// Error (good)
f(_asyncToGenerator(function*() {
return 0;
}));

View File

@ -0,0 +1,31 @@
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
try {
var info = gen[key](arg), value = info.value;
} catch (error) {
reject(error);
return;
}
info.done ? resolve(value) : Promise.resolve(value).then(_next, _throw);
}
function _asyncToGenerator(fn) {
return function() {
var self = this, args = arguments;
return new Promise(function(resolve, reject) {
var gen = fn.apply(self, args);
function _next(value) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
}
function _throw(err) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
}
_next(void 0);
});
};
}
_asyncToGenerator(function*() {
return 0;
}), _asyncToGenerator(function*() {
return 0;
}), _asyncToGenerator(function*() {
return 0;
});

View File

@ -0,0 +1,35 @@
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
try {
var info = gen[key](arg);
var value = info.value;
} catch (error) {
reject(error);
return;
}
if (info.done) {
resolve(value);
} else {
Promise.resolve(value).then(_next, _throw);
}
}
function _asyncToGenerator(fn) {
return function() {
var self = this, args = arguments;
return new Promise(function(resolve, reject) {
var gen = fn.apply(self, args);
function _next(value) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
}
function _throw(err) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
}
_next(undefined);
});
};
}
const x = _asyncToGenerator(function*(i) {
return yield someOtherFunction(i);
});
const x1 = _asyncToGenerator(function*(i) {
return yield someOtherFunction(i);
});

View File

@ -0,0 +1,29 @@
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
try {
var info = gen[key](arg), value = info.value;
} catch (error) {
reject(error);
return;
}
info.done ? resolve(value) : Promise.resolve(value).then(_next, _throw);
}
function _asyncToGenerator(fn) {
return function() {
var self = this, args = arguments;
return new Promise(function(resolve, reject) {
var gen = fn.apply(self, args);
function _next(value) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
}
function _throw(err) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
}
_next(void 0);
});
};
}
_asyncToGenerator(function*(i) {
return yield someOtherFunction(i);
}), _asyncToGenerator(function*(i) {
return yield someOtherFunction(i);
});

View File

@ -0,0 +1,148 @@
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
try {
var info = gen[key](arg);
var value = info.value;
} catch (error) {
reject(error);
return;
}
if (info.done) {
resolve(value);
} else {
Promise.resolve(value).then(_next, _throw);
}
}
function _asyncToGenerator(fn) {
return function() {
var self = this, args = arguments;
return new Promise(function(resolve, reject) {
var gen = fn.apply(self, args);
function _next(value) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
}
function _throw(err) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
}
_next(undefined);
});
};
}
function _f0() {
_f0 = _asyncToGenerator(function*() {
});
return _f0.apply(this, arguments);
}
function f0() {
return _f0.apply(this, arguments);
}
function _f1() {
_f1 = _asyncToGenerator(function*() {
});
return _f1.apply(this, arguments);
}
function f1() {
return _f1.apply(this, arguments);
}
function _f3() {
_f3 = _asyncToGenerator(function*() {
});
return _f3.apply(this, arguments);
}
function f3() {
return _f3.apply(this, arguments);
}
let f4 = function() {
var _ref = _asyncToGenerator(function*() {
});
return function() {
return _ref.apply(this, arguments);
};
}();
let f5 = function() {
var _ref = _asyncToGenerator(function*() {
});
return function() {
return _ref.apply(this, arguments);
};
}();
let f6 = function() {
var _ref = _asyncToGenerator(function*() {
});
return function() {
return _ref.apply(this, arguments);
};
}();
let f7 = _asyncToGenerator(function*() {
});
let f8 = _asyncToGenerator(function*() {
});
let f9 = _asyncToGenerator(function*() {
});
let f10 = _asyncToGenerator(function*() {
return p;
});
let f11 = _asyncToGenerator(function*() {
return mp;
});
let f12 = _asyncToGenerator(function*() {
return mp;
});
let f13 = _asyncToGenerator(function*() {
return p;
});
let o = {
m1 () {
return _asyncToGenerator(function*() {
})();
},
m2 () {
return _asyncToGenerator(function*() {
})();
},
m3 () {
return _asyncToGenerator(function*() {
})();
}
};
class C {
m1() {
return _asyncToGenerator(function*() {
})();
}
m2() {
return _asyncToGenerator(function*() {
})();
}
m3() {
return _asyncToGenerator(function*() {
})();
}
static m4() {
return _asyncToGenerator(function*() {
})();
}
static m5() {
return _asyncToGenerator(function*() {
})();
}
static m6() {
return _asyncToGenerator(function*() {
})();
}
}
var M;
(function(M) {
function _f1() {
_f1 = _asyncToGenerator(function*() {
});
return _f1.apply(this, arguments);
}
function f1() {
return _f1.apply(this, arguments);
}
M.f1 = f1;
})(M || (M = {
}));
// @target: es2017
// @isolatedModules: true
export { };

View File

@ -0,0 +1,62 @@
var M;
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
try {
var info = gen[key](arg), value = info.value;
} catch (error) {
reject(error);
return;
}
info.done ? resolve(value) : Promise.resolve(value).then(_next, _throw);
}
function _asyncToGenerator(fn) {
return function() {
var self = this, args = arguments;
return new Promise(function(resolve, reject) {
var gen = fn.apply(self, args);
function _next(value) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
}
function _throw(err) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
}
_next(void 0);
});
};
}
function _f0() {
return (_f0 = _asyncToGenerator(function*() {
})).apply(this, arguments);
}
function _f1() {
return (_f1 = _asyncToGenerator(function*() {
})).apply(this, arguments);
}
function _f3() {
return (_f3 = _asyncToGenerator(function*() {
})).apply(this, arguments);
}
_asyncToGenerator(function*() {
}), _asyncToGenerator(function*() {
}), _asyncToGenerator(function*() {
}), _asyncToGenerator(function*() {
}), _asyncToGenerator(function*() {
}), _asyncToGenerator(function*() {
}), _asyncToGenerator(function*() {
return p;
}), _asyncToGenerator(function*() {
return mp;
}), _asyncToGenerator(function*() {
return mp;
}), _asyncToGenerator(function*() {
return p;
}), (function(M) {
function _f1() {
return (_f1 = _asyncToGenerator(function*() {
})).apply(this, arguments);
}
M.f1 = function() {
return _f1.apply(this, arguments);
};
})(M || (M = {
}));
export { };

View File

@ -0,0 +1,157 @@
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
try {
var info = gen[key](arg);
var value = info.value;
} catch (error) {
reject(error);
return;
}
if (info.done) {
resolve(value);
} else {
Promise.resolve(value).then(_next, _throw);
}
}
function _asyncToGenerator(fn) {
return function() {
var self = this, args = arguments;
return new Promise(function(resolve, reject) {
var gen = fn.apply(self, args);
function _next(value) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
}
function _throw(err) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
}
_next(undefined);
});
};
}
function _f0() {
_f0 = _asyncToGenerator(function*() {
});
return _f0.apply(this, arguments);
}
function f0() {
return _f0.apply(this, arguments);
}
function _f1() {
_f1 = _asyncToGenerator(function*() {
});
return _f1.apply(this, arguments);
}
function f1() {
return _f1.apply(this, arguments);
}
function _f3() {
_f3 = _asyncToGenerator(function*() {
});
return _f3.apply(this, arguments);
}
function f3() {
return _f3.apply(this, arguments);
}
let f4 = function() {
var _ref = _asyncToGenerator(function*() {
});
return function() {
return _ref.apply(this, arguments);
};
}();
let f5 = function() {
var _ref = _asyncToGenerator(function*() {
});
return function() {
return _ref.apply(this, arguments);
};
}();
let f6 = function() {
var _ref = _asyncToGenerator(function*() {
});
return function() {
return _ref.apply(this, arguments);
};
}();
let f7 = _asyncToGenerator(function*() {
});
let f8 = _asyncToGenerator(function*() {
});
let f9 = _asyncToGenerator(function*() {
});
let f10 = _asyncToGenerator(function*() {
return p;
});
let f11 = _asyncToGenerator(function*() {
return mp;
});
let f12 = _asyncToGenerator(function*() {
return mp;
});
let f13 = _asyncToGenerator(function*() {
return p;
});
let o = {
m1 () {
return _asyncToGenerator(function*() {
})();
},
m2 () {
return _asyncToGenerator(function*() {
})();
},
m3 () {
return _asyncToGenerator(function*() {
})();
}
};
class C {
m1() {
return _asyncToGenerator(function*() {
})();
}
m2() {
return _asyncToGenerator(function*() {
})();
}
m3() {
return _asyncToGenerator(function*() {
})();
}
static m4() {
return _asyncToGenerator(function*() {
})();
}
static m5() {
return _asyncToGenerator(function*() {
})();
}
static m6() {
return _asyncToGenerator(function*() {
})();
}
}
var M;
(function(M) {
function _f1() {
_f1 = _asyncToGenerator(function*() {
});
return _f1.apply(this, arguments);
}
function f1() {
return _f1.apply(this, arguments);
}
M.f1 = f1;
})(M || (M = {
}));
function _f14() {
_f14 = _asyncToGenerator(function*() {
block: {
yield 1;
break block;
}
});
return _f14.apply(this, arguments);
}
function f14() {
return _f14.apply(this, arguments);
}

View File

@ -0,0 +1,69 @@
var M;
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
try {
var info = gen[key](arg), value = info.value;
} catch (error) {
reject(error);
return;
}
info.done ? resolve(value) : Promise.resolve(value).then(_next, _throw);
}
function _asyncToGenerator(fn) {
return function() {
var self = this, args = arguments;
return new Promise(function(resolve, reject) {
var gen = fn.apply(self, args);
function _next(value) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
}
function _throw(err) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
}
_next(void 0);
});
};
}
function _f0() {
return (_f0 = _asyncToGenerator(function*() {
})).apply(this, arguments);
}
function _f1() {
return (_f1 = _asyncToGenerator(function*() {
})).apply(this, arguments);
}
function _f3() {
return (_f3 = _asyncToGenerator(function*() {
})).apply(this, arguments);
}
function _f14() {
return (_f14 = _asyncToGenerator(function*() {
block: {
yield 1;
break block;
}
})).apply(this, arguments);
}
_asyncToGenerator(function*() {
}), _asyncToGenerator(function*() {
}), _asyncToGenerator(function*() {
}), _asyncToGenerator(function*() {
}), _asyncToGenerator(function*() {
}), _asyncToGenerator(function*() {
}), _asyncToGenerator(function*() {
return p;
}), _asyncToGenerator(function*() {
return mp;
}), _asyncToGenerator(function*() {
return mp;
}), _asyncToGenerator(function*() {
return p;
}), (function(M) {
function _f1() {
return (_f1 = _asyncToGenerator(function*() {
})).apply(this, arguments);
}
M.f1 = function() {
return _f1.apply(this, arguments);
};
})(M || (M = {
}));

View File

@ -0,0 +1,99 @@
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
try {
var info = gen[key](arg);
var value = info.value;
} catch (error) {
reject(error);
return;
}
if (info.done) {
resolve(value);
} else {
Promise.resolve(value).then(_next, _throw);
}
}
function _asyncToGenerator(fn) {
return function() {
var self = this, args = arguments;
return new Promise(function(resolve, reject) {
var gen = fn.apply(self, args);
function _next(value) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
}
function _throw(err) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
}
_next(undefined);
});
};
}
// @target: es6
class A {
x() {
}
y() {
}
}
class B extends A {
// async method with only call/get on 'super' does not require a binding
simple() {
var _super_x = (..._args)=>super.x(..._args)
, _super_y = (..._args)=>super.y(..._args)
, _super_method = (..._args)=>super["x"](..._args)
, _super_x1 = ()=>super.x
, _super_method1 = ()=>super["x"]
;
return _asyncToGenerator(function*() {
const _super = null;
const _superIndex = null;
// call with property access
_super_x();
// call additional property.
_super_y();
// call with element access
_super_method();
// property access (read)
const a = _super_x1();
// element access (read)
const b = _super_method1();
})();
}
// async method with assignment/destructuring on 'super' requires a binding
advanced() {
var _super_x = (..._args)=>super.x(..._args)
, _super_method = (..._args)=>super["x"](..._args)
, _super_x3 = ()=>super.x
, _super_method3 = ()=>super["x"]
, _super_x4 = (_args)=>// property access (assign)
super.x = _args
, _super_method4 = (_args)=>// element access (assign)
super["x"] = _args
, _super_x5 = ()=>super.x
, _super_method5 = ()=>super["x"]
;
return _asyncToGenerator(function*() {
const _super = null;
const _superIndex = null;
const f = ()=>{
};
// call with property access
_super_x();
// call with element access
_super_method();
// property access (read)
const a = _super_x3();
// element access (read)
const b = _super_method3();
_super_x4(f);
_super_method4(f);
// destructuring assign with property access
({ f: _super_x5() } = {
f
});
// destructuring assign with element access
({ f: _super_method5() } = {
f
});
})();
}
}

View File

@ -0,0 +1,96 @@
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
try {
var info = gen[key](arg);
var value = info.value;
} catch (error) {
reject(error);
return;
}
if (info.done) {
resolve(value);
} else {
Promise.resolve(value).then(_next, _throw);
}
}
function _asyncToGenerator(fn) {
return function() {
var self = this, args = arguments;
return new Promise(function(resolve, reject) {
var gen = fn.apply(self, args);
function _next(value) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
}
function _throw(err) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
}
_next(undefined);
});
};
}
// @target: es2017
// @noEmitHelpers: true
class A {
x() {
}
y() {
}
}
class B extends A {
// async method with only call/get on 'super' does not require a binding
simple() {
var _super_x = (..._args)=>super.x(..._args)
, _super_y = (..._args)=>super.y(..._args)
, _super_method = (..._args)=>super["x"](..._args)
, _super_x1 = ()=>super.x
, _super_method1 = ()=>super["x"]
;
return _asyncToGenerator(function*() {
// call with property access
_super_x();
// call additional property.
_super_y();
// call with element access
_super_method();
// property access (read)
const a = _super_x1();
// element access (read)
const b = _super_method1();
})();
}
// async method with assignment/destructuring on 'super' requires a binding
advanced() {
var _super_x = (..._args)=>super.x(..._args)
, _super_method = (..._args)=>super["x"](..._args)
, _super_x3 = ()=>super.x
, _super_method3 = ()=>super["x"]
, _super_x4 = (_args)=>// property access (assign)
super.x = _args
, _super_method4 = (_args)=>// element access (assign)
super["x"] = _args
, _super_x5 = ()=>super.x
, _super_method5 = ()=>super["x"]
;
return _asyncToGenerator(function*() {
const f = ()=>{
};
// call with property access
_super_x();
// call with element access
_super_method();
// property access (read)
const a = _super_x3();
// element access (read)
const b = _super_method3();
_super_x4(f);
_super_method4(f);
// destructuring assign with property access
({ f: _super_x5() } = {
f
});
// destructuring assign with element access
({ f: _super_method5() } = {
f
});
})();
}
}

View File

@ -0,0 +1,39 @@
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
try {
var info = gen[key](arg);
var value = info.value;
} catch (error) {
reject(error);
return;
}
if (info.done) {
resolve(value);
} else {
Promise.resolve(value).then(_next, _throw);
}
}
function _asyncToGenerator(fn) {
return function() {
var self = this, args = arguments;
return new Promise(function(resolve, reject) {
var gen = fn.apply(self, args);
function _next(value) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
}
function _throw(err) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
}
_next(undefined);
});
};
}
function _func() {
_func = _asyncToGenerator(function*() {
"use strict";
var b = (yield p) || a;
});
return _func.apply(this, arguments);
}
function func() {
return _func.apply(this, arguments);
}

View File

@ -0,0 +1,29 @@
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
try {
var info = gen[key](arg), value = info.value;
} catch (error) {
reject(error);
return;
}
info.done ? resolve(value) : Promise.resolve(value).then(_next, _throw);
}
function _func() {
return (_func = (function(fn) {
return function() {
var self = this, args = arguments;
return new Promise(function(resolve, reject) {
var gen = fn.apply(self, args);
function _next(value) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
}
function _throw(err) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
}
_next(void 0);
});
};
})(function*() {
"use strict";
yield p;
})).apply(this, arguments);
}

View File

@ -0,0 +1,40 @@
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
try {
var info = gen[key](arg);
var value = info.value;
} catch (error) {
reject(error);
return;
}
if (info.done) {
resolve(value);
} else {
Promise.resolve(value).then(_next, _throw);
}
}
function _asyncToGenerator(fn) {
return function() {
var self = this, args = arguments;
return new Promise(function(resolve, reject) {
var gen = fn.apply(self, args);
function _next(value) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
}
function _throw(err) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
}
_next(undefined);
});
};
}
function _func() {
_func = _asyncToGenerator(function*() {
before();
var b = (yield p) || a;
after();
});
return _func.apply(this, arguments);
}
function func() {
return _func.apply(this, arguments);
}

View File

@ -0,0 +1,28 @@
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
try {
var info = gen[key](arg), value = info.value;
} catch (error) {
reject(error);
return;
}
info.done ? resolve(value) : Promise.resolve(value).then(_next, _throw);
}
function _func() {
return (_func = (function(fn) {
return function() {
var self = this, args = arguments;
return new Promise(function(resolve, reject) {
var gen = fn.apply(self, args);
function _next(value) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
}
function _throw(err) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
}
_next(void 0);
});
};
})(function*() {
before(), yield p, after();
})).apply(this, arguments);
}

View File

@ -0,0 +1,40 @@
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
try {
var info = gen[key](arg);
var value = info.value;
} catch (error) {
reject(error);
return;
}
if (info.done) {
resolve(value);
} else {
Promise.resolve(value).then(_next, _throw);
}
}
function _asyncToGenerator(fn) {
return function() {
var self = this, args = arguments;
return new Promise(function(resolve, reject) {
var gen = fn.apply(self, args);
function _next(value) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
}
function _throw(err) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
}
_next(undefined);
});
};
}
function _func() {
_func = _asyncToGenerator(function*() {
before();
var b = (yield p) && a;
after();
});
return _func.apply(this, arguments);
}
function func() {
return _func.apply(this, arguments);
}

View File

@ -0,0 +1,28 @@
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
try {
var info = gen[key](arg), value = info.value;
} catch (error) {
reject(error);
return;
}
info.done ? resolve(value) : Promise.resolve(value).then(_next, _throw);
}
function _func() {
return (_func = (function(fn) {
return function() {
var self = this, args = arguments;
return new Promise(function(resolve, reject) {
var gen = fn.apply(self, args);
function _next(value) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
}
function _throw(err) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
}
_next(void 0);
});
};
})(function*() {
before(), yield p, after();
})).apply(this, arguments);
}

View File

@ -0,0 +1,40 @@
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
try {
var info = gen[key](arg);
var value = info.value;
} catch (error) {
reject(error);
return;
}
if (info.done) {
resolve(value);
} else {
Promise.resolve(value).then(_next, _throw);
}
}
function _asyncToGenerator(fn) {
return function() {
var self = this, args = arguments;
return new Promise(function(resolve, reject) {
var gen = fn.apply(self, args);
function _next(value) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
}
function _throw(err) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
}
_next(undefined);
});
};
}
function _func() {
_func = _asyncToGenerator(function*() {
before();
var b = (yield p) + a;
after();
});
return _func.apply(this, arguments);
}
function func() {
return _func.apply(this, arguments);
}

View File

@ -0,0 +1,28 @@
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
try {
var info = gen[key](arg), value = info.value;
} catch (error) {
reject(error);
return;
}
info.done ? resolve(value) : Promise.resolve(value).then(_next, _throw);
}
function _func() {
return (_func = (function(fn) {
return function() {
var self = this, args = arguments;
return new Promise(function(resolve, reject) {
var gen = fn.apply(self, args);
function _next(value) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
}
function _throw(err) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
}
_next(void 0);
});
};
})(function*() {
before(), (yield p) + a, after();
})).apply(this, arguments);
}

View File

@ -0,0 +1,40 @@
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
try {
var info = gen[key](arg);
var value = info.value;
} catch (error) {
reject(error);
return;
}
if (info.done) {
resolve(value);
} else {
Promise.resolve(value).then(_next, _throw);
}
}
function _asyncToGenerator(fn) {
return function() {
var self = this, args = arguments;
return new Promise(function(resolve, reject) {
var gen = fn.apply(self, args);
function _next(value) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
}
function _throw(err) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
}
_next(undefined);
});
};
}
function _func() {
_func = _asyncToGenerator(function*() {
before();
var b = (yield p, a);
after();
});
return _func.apply(this, arguments);
}
function func() {
return _func.apply(this, arguments);
}

View File

@ -0,0 +1,28 @@
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
try {
var info = gen[key](arg), value = info.value;
} catch (error) {
reject(error);
return;
}
info.done ? resolve(value) : Promise.resolve(value).then(_next, _throw);
}
function _func() {
return (_func = (function(fn) {
return function() {
var self = this, args = arguments;
return new Promise(function(resolve, reject) {
var gen = fn.apply(self, args);
function _next(value) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
}
function _throw(err) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
}
_next(void 0);
});
};
})(function*() {
before(), yield p, after();
})).apply(this, arguments);
}

View File

@ -0,0 +1,41 @@
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
try {
var info = gen[key](arg);
var value = info.value;
} catch (error) {
reject(error);
return;
}
if (info.done) {
resolve(value);
} else {
Promise.resolve(value).then(_next, _throw);
}
}
function _asyncToGenerator(fn) {
return function() {
var self = this, args = arguments;
return new Promise(function(resolve, reject) {
var gen = fn.apply(self, args);
function _next(value) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
}
function _throw(err) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
}
_next(undefined);
});
};
}
function _func() {
_func = _asyncToGenerator(function*() {
before();
var o;
o.a = yield p;
after();
});
return _func.apply(this, arguments);
}
function func() {
return _func.apply(this, arguments);
}

View File

@ -0,0 +1,29 @@
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
try {
var info = gen[key](arg), value = info.value;
} catch (error) {
reject(error);
return;
}
info.done ? resolve(value) : Promise.resolve(value).then(_next, _throw);
}
function _func() {
return (_func = (function(fn) {
return function() {
var self = this, args = arguments;
return new Promise(function(resolve, reject) {
var gen = fn.apply(self, args);
function _next(value) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
}
function _throw(err) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
}
_next(void 0);
});
};
})(function*() {
var o;
before(), o.a = yield p, after();
})).apply(this, arguments);
}

View File

@ -0,0 +1,40 @@
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
try {
var info = gen[key](arg);
var value = info.value;
} catch (error) {
reject(error);
return;
}
if (info.done) {
resolve(value);
} else {
Promise.resolve(value).then(_next, _throw);
}
}
function _asyncToGenerator(fn) {
return function() {
var self = this, args = arguments;
return new Promise(function(resolve, reject) {
var gen = fn.apply(self, args);
function _next(value) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
}
function _throw(err) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
}
_next(undefined);
});
};
}
function _func() {
_func = _asyncToGenerator(function*() {
before();
var b = fn(a, a, a);
after();
});
return _func.apply(this, arguments);
}
function func() {
return _func.apply(this, arguments);
}

View File

@ -0,0 +1,28 @@
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
try {
var info = gen[key](arg), value = info.value;
} catch (error) {
reject(error);
return;
}
info.done ? resolve(value) : Promise.resolve(value).then(_next, _throw);
}
function _func() {
return (_func = (function(fn) {
return function() {
var self = this, args = arguments;
return new Promise(function(resolve, reject) {
var gen = fn.apply(self, args);
function _next(value) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
}
function _throw(err) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
}
_next(void 0);
});
};
})(function*() {
before(), fn(a, a, a), after();
})).apply(this, arguments);
}

View File

@ -0,0 +1,40 @@
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
try {
var info = gen[key](arg);
var value = info.value;
} catch (error) {
reject(error);
return;
}
if (info.done) {
resolve(value);
} else {
Promise.resolve(value).then(_next, _throw);
}
}
function _asyncToGenerator(fn) {
return function() {
var self = this, args = arguments;
return new Promise(function(resolve, reject) {
var gen = fn.apply(self, args);
function _next(value) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
}
function _throw(err) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
}
_next(undefined);
});
};
}
function _func() {
_func = _asyncToGenerator(function*() {
before();
var b = fn((yield p), a, a);
after();
});
return _func.apply(this, arguments);
}
function func() {
return _func.apply(this, arguments);
}

View File

@ -0,0 +1,28 @@
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
try {
var info = gen[key](arg), value = info.value;
} catch (error) {
reject(error);
return;
}
info.done ? resolve(value) : Promise.resolve(value).then(_next, _throw);
}
function _func() {
return (_func = (function(fn) {
return function() {
var self = this, args = arguments;
return new Promise(function(resolve, reject) {
var gen = fn.apply(self, args);
function _next(value) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
}
function _throw(err) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
}
_next(void 0);
});
};
})(function*() {
before(), fn((yield p), a, a), after();
})).apply(this, arguments);
}

View File

@ -0,0 +1,40 @@
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
try {
var info = gen[key](arg);
var value = info.value;
} catch (error) {
reject(error);
return;
}
if (info.done) {
resolve(value);
} else {
Promise.resolve(value).then(_next, _throw);
}
}
function _asyncToGenerator(fn) {
return function() {
var self = this, args = arguments;
return new Promise(function(resolve, reject) {
var gen = fn.apply(self, args);
function _next(value) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
}
function _throw(err) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
}
_next(undefined);
});
};
}
function _func() {
_func = _asyncToGenerator(function*() {
before();
var b = fn(a, (yield p), a);
after();
});
return _func.apply(this, arguments);
}
function func() {
return _func.apply(this, arguments);
}

View File

@ -0,0 +1,28 @@
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
try {
var info = gen[key](arg), value = info.value;
} catch (error) {
reject(error);
return;
}
info.done ? resolve(value) : Promise.resolve(value).then(_next, _throw);
}
function _func() {
return (_func = (function(fn) {
return function() {
var self = this, args = arguments;
return new Promise(function(resolve, reject) {
var gen = fn.apply(self, args);
function _next(value) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
}
function _throw(err) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
}
_next(void 0);
});
};
})(function*() {
before(), fn(a, (yield p), a), after();
})).apply(this, arguments);
}

View File

@ -0,0 +1,40 @@
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
try {
var info = gen[key](arg);
var value = info.value;
} catch (error) {
reject(error);
return;
}
if (info.done) {
resolve(value);
} else {
Promise.resolve(value).then(_next, _throw);
}
}
function _asyncToGenerator(fn) {
return function() {
var self = this, args = arguments;
return new Promise(function(resolve, reject) {
var gen = fn.apply(self, args);
function _next(value) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
}
function _throw(err) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
}
_next(undefined);
});
};
}
function _func() {
_func = _asyncToGenerator(function*() {
before();
var b = yield pfn(a, a, a);
after();
});
return _func.apply(this, arguments);
}
function func() {
return _func.apply(this, arguments);
}

View File

@ -0,0 +1,28 @@
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
try {
var info = gen[key](arg), value = info.value;
} catch (error) {
reject(error);
return;
}
info.done ? resolve(value) : Promise.resolve(value).then(_next, _throw);
}
function _func() {
return (_func = (function(fn) {
return function() {
var self = this, args = arguments;
return new Promise(function(resolve, reject) {
var gen = fn.apply(self, args);
function _next(value) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
}
function _throw(err) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
}
_next(void 0);
});
};
})(function*() {
before(), yield pfn(a, a, a), after();
})).apply(this, arguments);
}

View File

@ -0,0 +1,40 @@
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
try {
var info = gen[key](arg);
var value = info.value;
} catch (error) {
reject(error);
return;
}
if (info.done) {
resolve(value);
} else {
Promise.resolve(value).then(_next, _throw);
}
}
function _asyncToGenerator(fn) {
return function() {
var self = this, args = arguments;
return new Promise(function(resolve, reject) {
var gen = fn.apply(self, args);
function _next(value) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
}
function _throw(err) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
}
_next(undefined);
});
};
}
function _func() {
_func = _asyncToGenerator(function*() {
before();
var b = o.fn(a, a, a);
after();
});
return _func.apply(this, arguments);
}
function func() {
return _func.apply(this, arguments);
}

View File

@ -0,0 +1,28 @@
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
try {
var info = gen[key](arg), value = info.value;
} catch (error) {
reject(error);
return;
}
info.done ? resolve(value) : Promise.resolve(value).then(_next, _throw);
}
function _func() {
return (_func = (function(fn) {
return function() {
var self = this, args = arguments;
return new Promise(function(resolve, reject) {
var gen = fn.apply(self, args);
function _next(value) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
}
function _throw(err) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
}
_next(void 0);
});
};
})(function*() {
before(), o.fn(a, a, a), after();
})).apply(this, arguments);
}

View File

@ -0,0 +1,40 @@
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
try {
var info = gen[key](arg);
var value = info.value;
} catch (error) {
reject(error);
return;
}
if (info.done) {
resolve(value);
} else {
Promise.resolve(value).then(_next, _throw);
}
}
function _asyncToGenerator(fn) {
return function() {
var self = this, args = arguments;
return new Promise(function(resolve, reject) {
var gen = fn.apply(self, args);
function _next(value) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
}
function _throw(err) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
}
_next(undefined);
});
};
}
function _func() {
_func = _asyncToGenerator(function*() {
before();
var b = o.fn((yield p), a, a);
after();
});
return _func.apply(this, arguments);
}
function func() {
return _func.apply(this, arguments);
}

View File

@ -0,0 +1,28 @@
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
try {
var info = gen[key](arg), value = info.value;
} catch (error) {
reject(error);
return;
}
info.done ? resolve(value) : Promise.resolve(value).then(_next, _throw);
}
function _func() {
return (_func = (function(fn) {
return function() {
var self = this, args = arguments;
return new Promise(function(resolve, reject) {
var gen = fn.apply(self, args);
function _next(value) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
}
function _throw(err) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
}
_next(void 0);
});
};
})(function*() {
before(), o.fn((yield p), a, a), after();
})).apply(this, arguments);
}

View File

@ -0,0 +1,40 @@
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
try {
var info = gen[key](arg);
var value = info.value;
} catch (error) {
reject(error);
return;
}
if (info.done) {
resolve(value);
} else {
Promise.resolve(value).then(_next, _throw);
}
}
function _asyncToGenerator(fn) {
return function() {
var self = this, args = arguments;
return new Promise(function(resolve, reject) {
var gen = fn.apply(self, args);
function _next(value) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
}
function _throw(err) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
}
_next(undefined);
});
};
}
function _func() {
_func = _asyncToGenerator(function*() {
before();
var b = o.fn(a, (yield p), a);
after();
});
return _func.apply(this, arguments);
}
function func() {
return _func.apply(this, arguments);
}

View File

@ -0,0 +1,28 @@
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
try {
var info = gen[key](arg), value = info.value;
} catch (error) {
reject(error);
return;
}
info.done ? resolve(value) : Promise.resolve(value).then(_next, _throw);
}
function _func() {
return (_func = (function(fn) {
return function() {
var self = this, args = arguments;
return new Promise(function(resolve, reject) {
var gen = fn.apply(self, args);
function _next(value) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
}
function _throw(err) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
}
_next(void 0);
});
};
})(function*() {
before(), o.fn(a, (yield p), a), after();
})).apply(this, arguments);
}

View File

@ -0,0 +1,40 @@
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
try {
var info = gen[key](arg);
var value = info.value;
} catch (error) {
reject(error);
return;
}
if (info.done) {
resolve(value);
} else {
Promise.resolve(value).then(_next, _throw);
}
}
function _asyncToGenerator(fn) {
return function() {
var self = this, args = arguments;
return new Promise(function(resolve, reject) {
var gen = fn.apply(self, args);
function _next(value) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
}
function _throw(err) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
}
_next(undefined);
});
};
}
function _func() {
_func = _asyncToGenerator(function*() {
before();
var b = (yield po).fn(a, a, a);
after();
});
return _func.apply(this, arguments);
}
function func() {
return _func.apply(this, arguments);
}

View File

@ -0,0 +1,28 @@
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
try {
var info = gen[key](arg), value = info.value;
} catch (error) {
reject(error);
return;
}
info.done ? resolve(value) : Promise.resolve(value).then(_next, _throw);
}
function _func() {
return (_func = (function(fn) {
return function() {
var self = this, args = arguments;
return new Promise(function(resolve, reject) {
var gen = fn.apply(self, args);
function _next(value) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
}
function _throw(err) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
}
_next(void 0);
});
};
})(function*() {
before(), (yield po).fn(a, a, a), after();
})).apply(this, arguments);
}

View File

@ -0,0 +1,39 @@
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
try {
var info = gen[key](arg);
var value = info.value;
} catch (error) {
reject(error);
return;
}
if (info.done) {
resolve(value);
} else {
Promise.resolve(value).then(_next, _throw);
}
}
function _asyncToGenerator(fn) {
return function() {
var self = this, args = arguments;
return new Promise(function(resolve, reject) {
var gen = fn.apply(self, args);
function _next(value) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
}
function _throw(err) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
}
_next(undefined);
});
};
}
function _func() {
_func = _asyncToGenerator(function*() {
class D extends yield p {
}
});
return _func.apply(this, arguments);
}
function func() {
return _func.apply(this, arguments);
}

View File

@ -0,0 +1,29 @@
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
try {
var info = gen[key](arg), value = info.value;
} catch (error) {
reject(error);
return;
}
info.done ? resolve(value) : Promise.resolve(value).then(_next, _throw);
}
function _func() {
return (_func = (function(fn) {
return function() {
var self = this, args = arguments;
return new Promise(function(resolve, reject) {
var gen = fn.apply(self, args);
function _next(value) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
}
function _throw(err) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
}
_next(void 0);
});
};
})(function*() {
class D extends yield p {
}
})).apply(this, arguments);
}

View File

@ -0,0 +1,38 @@
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
try {
var info = gen[key](arg);
var value = info.value;
} catch (error) {
reject(error);
return;
}
if (info.done) {
resolve(value);
} else {
Promise.resolve(value).then(_next, _throw);
}
}
function _asyncToGenerator(fn) {
return function() {
var self = this, args = arguments;
return new Promise(function(resolve, reject) {
var gen = fn.apply(self, args);
function _next(value) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
}
function _throw(err) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
}
_next(undefined);
});
};
}
function _f() {
_f = _asyncToGenerator(function*() {
yield a;
});
return _f.apply(this, arguments);
}
function f() {
return _f.apply(this, arguments);
}

View File

@ -0,0 +1,28 @@
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
try {
var info = gen[key](arg), value = info.value;
} catch (error) {
reject(error);
return;
}
info.done ? resolve(value) : Promise.resolve(value).then(_next, _throw);
}
function _f() {
return (_f = (function(fn) {
return function() {
var self = this, args = arguments;
return new Promise(function(resolve, reject) {
var gen = fn.apply(self, args);
function _next(value) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
}
function _throw(err) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
}
_next(void 0);
});
};
})(function*() {
yield a;
})).apply(this, arguments);
}

View File

@ -0,0 +1,66 @@
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
try {
var info = gen[key](arg);
var value = info.value;
} catch (error) {
reject(error);
return;
}
if (info.done) {
resolve(value);
} else {
Promise.resolve(value).then(_next, _throw);
}
}
function _asyncToGenerator(fn) {
return function() {
var self = this, args = arguments;
return new Promise(function(resolve, reject) {
var gen = fn.apply(self, args);
function _next(value) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
}
function _throw(err) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
}
_next(undefined);
});
};
}
function _bar() {
_bar = // @target: es2017
_asyncToGenerator(function*() {
!(yield 42); // OK
});
return _bar.apply(this, arguments);
}
function bar() {
return _bar.apply(this, arguments);
}
function _bar1() {
_bar1 = _asyncToGenerator(function*() {
+(yield 42); // OK
});
return _bar1.apply(this, arguments);
}
function bar1() {
return _bar1.apply(this, arguments);
}
function _bar3() {
_bar3 = _asyncToGenerator(function*() {
-(yield 42); // OK
});
return _bar3.apply(this, arguments);
}
function bar3() {
return _bar3.apply(this, arguments);
}
function _bar4() {
_bar4 = _asyncToGenerator(function*() {
~(yield 42); // OK
});
return _bar4.apply(this, arguments);
}
function bar4() {
return _bar4.apply(this, arguments);
}

View File

@ -0,0 +1,44 @@
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
try {
var info = gen[key](arg), value = info.value;
} catch (error) {
reject(error);
return;
}
info.done ? resolve(value) : Promise.resolve(value).then(_next, _throw);
}
function _asyncToGenerator(fn) {
return function() {
var self = this, args = arguments;
return new Promise(function(resolve, reject) {
var gen = fn.apply(self, args);
function _next(value) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
}
function _throw(err) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
}
_next(void 0);
});
};
}
function _bar() {
return (_bar = _asyncToGenerator(function*() {
yield 42;
})).apply(this, arguments);
}
function _bar1() {
return (_bar1 = _asyncToGenerator(function*() {
yield 42;
})).apply(this, arguments);
}
function _bar3() {
return (_bar3 = _asyncToGenerator(function*() {
yield 42;
})).apply(this, arguments);
}
function _bar4() {
return (_bar4 = _asyncToGenerator(function*() {
yield 42;
})).apply(this, arguments);
}

View File

@ -0,0 +1,75 @@
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
try {
var info = gen[key](arg);
var value = info.value;
} catch (error) {
reject(error);
return;
}
if (info.done) {
resolve(value);
} else {
Promise.resolve(value).then(_next, _throw);
}
}
function _asyncToGenerator(fn) {
return function() {
var self = this, args = arguments;
return new Promise(function(resolve, reject) {
var gen = fn.apply(self, args);
function _next(value) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
}
function _throw(err) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
}
_next(undefined);
});
};
}
function _bar() {
_bar = // @target: es2017
_asyncToGenerator(function*() {
!(yield 42); // OK
});
return _bar.apply(this, arguments);
}
function bar() {
return _bar.apply(this, arguments);
}
function _bar1() {
_bar1 = _asyncToGenerator(function*() {
delete (yield 42); // OK
});
return _bar1.apply(this, arguments);
}
function bar1() {
return _bar1.apply(this, arguments);
}
function _bar2() {
_bar2 = _asyncToGenerator(function*() {
delete (yield 42); // OK
});
return _bar2.apply(this, arguments);
}
function bar2() {
return _bar2.apply(this, arguments);
}
function _bar3() {
_bar3 = _asyncToGenerator(function*() {
void (yield 42);
});
return _bar3.apply(this, arguments);
}
function bar3() {
return _bar3.apply(this, arguments);
}
function _bar4() {
_bar4 = _asyncToGenerator(function*() {
+(yield 42);
});
return _bar4.apply(this, arguments);
}
function bar4() {
return _bar4.apply(this, arguments);
}

View File

@ -0,0 +1,49 @@
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
try {
var info = gen[key](arg), value = info.value;
} catch (error) {
reject(error);
return;
}
info.done ? resolve(value) : Promise.resolve(value).then(_next, _throw);
}
function _asyncToGenerator(fn) {
return function() {
var self = this, args = arguments;
return new Promise(function(resolve, reject) {
var gen = fn.apply(self, args);
function _next(value) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
}
function _throw(err) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
}
_next(void 0);
});
};
}
function _bar() {
return (_bar = _asyncToGenerator(function*() {
yield 42;
})).apply(this, arguments);
}
function _bar1() {
return (_bar1 = _asyncToGenerator(function*() {
delete (yield 42);
})).apply(this, arguments);
}
function _bar2() {
return (_bar2 = _asyncToGenerator(function*() {
delete (yield 42);
})).apply(this, arguments);
}
function _bar3() {
return (_bar3 = _asyncToGenerator(function*() {
yield 42;
})).apply(this, arguments);
}
function _bar4() {
return (_bar4 = _asyncToGenerator(function*() {
yield 42;
})).apply(this, arguments);
}

View File

@ -0,0 +1,57 @@
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
try {
var info = gen[key](arg);
var value = info.value;
} catch (error) {
reject(error);
return;
}
if (info.done) {
resolve(value);
} else {
Promise.resolve(value).then(_next, _throw);
}
}
function _asyncToGenerator(fn) {
return function() {
var self = this, args = arguments;
return new Promise(function(resolve, reject) {
var gen = fn.apply(self, args);
function _next(value) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
}
function _throw(err) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
}
_next(undefined);
});
};
}
function _bar1() {
_bar1 = // @target: es2017
_asyncToGenerator(function*() {
delete (yield 42);
});
return _bar1.apply(this, arguments);
}
function bar1() {
return _bar1.apply(this, arguments);
}
function _bar2() {
_bar2 = _asyncToGenerator(function*() {
delete (yield 42);
});
return _bar2.apply(this, arguments);
}
function bar2() {
return _bar2.apply(this, arguments);
}
function _bar3() {
_bar3 = _asyncToGenerator(function*() {
void (yield 42);
});
return _bar3.apply(this, arguments);
}
function bar3() {
return _bar3.apply(this, arguments);
}

View File

@ -0,0 +1,39 @@
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
try {
var info = gen[key](arg), value = info.value;
} catch (error) {
reject(error);
return;
}
info.done ? resolve(value) : Promise.resolve(value).then(_next, _throw);
}
function _asyncToGenerator(fn) {
return function() {
var self = this, args = arguments;
return new Promise(function(resolve, reject) {
var gen = fn.apply(self, args);
function _next(value) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
}
function _throw(err) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
}
_next(void 0);
});
};
}
function _bar1() {
return (_bar1 = _asyncToGenerator(function*() {
delete (yield 42);
})).apply(this, arguments);
}
function _bar2() {
return (_bar2 = _asyncToGenerator(function*() {
delete (yield 42);
})).apply(this, arguments);
}
function _bar3() {
return (_bar3 = _asyncToGenerator(function*() {
yield 42;
})).apply(this, arguments);
}

View File

@ -0,0 +1,39 @@
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
try {
var info = gen[key](arg);
var value = info.value;
} catch (error) {
reject(error);
return;
}
if (info.done) {
resolve(value);
} else {
Promise.resolve(value).then(_next, _throw);
}
}
function _asyncToGenerator(fn) {
return function() {
var self = this, args = arguments;
return new Promise(function(resolve, reject) {
var gen = fn.apply(self, args);
function _next(value) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
}
function _throw(err) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
}
_next(undefined);
});
};
}
function _await() {
_await = // @target: es2017
// @noEmitHelpers: true
_asyncToGenerator(function*() {
});
return _await.apply(this, arguments);
}
function _await1() {
return _await.apply(this, arguments);
}

View File

@ -0,0 +1,27 @@
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
try {
var info = gen[key](arg), value = info.value;
} catch (error) {
reject(error);
return;
}
info.done ? resolve(value) : Promise.resolve(value).then(_next, _throw);
}
function _await() {
return (_await = (function(fn) {
return function() {
var self = this, args = arguments;
return new Promise(function(resolve, reject) {
var gen = fn.apply(self, args);
function _next(value) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
}
function _throw(err) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
}
_next(void 0);
});
};
})(function*() {
})).apply(this, arguments);
}

View File

@ -0,0 +1,41 @@
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
try {
var info = gen[key](arg);
var value = info.value;
} catch (error) {
reject(error);
return;
}
if (info.done) {
resolve(value);
} else {
Promise.resolve(value).then(_next, _throw);
}
}
function _asyncToGenerator(fn) {
return function() {
var self = this, args = arguments;
return new Promise(function(resolve, reject) {
var gen = fn.apply(self, args);
function _next(value) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
}
function _throw(err) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
}
_next(undefined);
});
};
}
function _foo() {
_foo = // @target: es2017
// @noEmitHelpers: true
_asyncToGenerator(function*() {
// Legal to use 'await' in a type context.
var v;
});
return _foo.apply(this, arguments);
}
function foo() {
return _foo.apply(this, arguments);
}

View File

@ -0,0 +1,27 @@
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
try {
var info = gen[key](arg), value = info.value;
} catch (error) {
reject(error);
return;
}
info.done ? resolve(value) : Promise.resolve(value).then(_next, _throw);
}
function _foo() {
return (_foo = (function(fn) {
return function() {
var self = this, args = arguments;
return new Promise(function(resolve, reject) {
var gen = fn.apply(self, args);
function _next(value) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
}
function _throw(err) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
}
_next(void 0);
});
};
})(function*() {
})).apply(this, arguments);
}

View File

@ -0,0 +1,40 @@
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
try {
var info = gen[key](arg);
var value = info.value;
} catch (error) {
reject(error);
return;
}
if (info.done) {
resolve(value);
} else {
Promise.resolve(value).then(_next, _throw);
}
}
function _asyncToGenerator(fn) {
return function() {
var self = this, args = arguments;
return new Promise(function(resolve, reject) {
var gen = fn.apply(self, args);
function _next(value) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
}
function _throw(err) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
}
_next(undefined);
});
};
}
function _foo() {
_foo = // @target: es2017
// @noEmitHelpers: true
_asyncToGenerator(function*() {
return;
});
return _foo.apply(this, arguments);
}
function foo() {
return _foo.apply(this, arguments);
}

View File

@ -0,0 +1,27 @@
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
try {
var info = gen[key](arg), value = info.value;
} catch (error) {
reject(error);
return;
}
info.done ? resolve(value) : Promise.resolve(value).then(_next, _throw);
}
function _foo() {
return (_foo = (function(fn) {
return function() {
var self = this, args = arguments;
return new Promise(function(resolve, reject) {
var gen = fn.apply(self, args);
function _next(value) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
}
function _throw(err) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
}
_next(void 0);
});
};
})(function*() {
})).apply(this, arguments);
}

View File

@ -0,0 +1,39 @@
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
try {
var info = gen[key](arg);
var value = info.value;
} catch (error) {
reject(error);
return;
}
if (info.done) {
resolve(value);
} else {
Promise.resolve(value).then(_next, _throw);
}
}
function _asyncToGenerator(fn) {
return function() {
var self = this, args = arguments;
return new Promise(function(resolve, reject) {
var gen = fn.apply(self, args);
function _next(value) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
}
function _throw(err) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
}
_next(undefined);
});
};
}
function _foo() {
_foo = // @target: es2017
// @noEmitHelpers: true
_asyncToGenerator(function*() {
});
return _foo.apply(this, arguments);
}
function foo() {
return _foo.apply(this, arguments);
}

View File

@ -0,0 +1,27 @@
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
try {
var info = gen[key](arg), value = info.value;
} catch (error) {
reject(error);
return;
}
info.done ? resolve(value) : Promise.resolve(value).then(_next, _throw);
}
function _foo() {
return (_foo = (function(fn) {
return function() {
var self = this, args = arguments;
return new Promise(function(resolve, reject) {
var gen = fn.apply(self, args);
function _next(value) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
}
function _throw(err) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
}
_next(void 0);
});
};
})(function*() {
})).apply(this, arguments);
}

View File

@ -0,0 +1,4 @@
// @target: es2017
// @noEmitHelpers: true
function f(_await) {
}

View File

@ -0,0 +1,4 @@
// @target: es2017
// @noEmitHelpers: true
function f(_await = _await) {
}

View File

@ -0,0 +1,4 @@
// @target: es2017
// @noEmitHelpers: true
function _await() {
}

View File

@ -0,0 +1,5 @@
// @target: es2017
// @noEmitHelpers: true
var v = {
[await]: foo
};

View File

@ -0,0 +1,37 @@
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
try {
var info = gen[key](arg);
var value = info.value;
} catch (error) {
reject(error);
return;
}
if (info.done) {
resolve(value);
} else {
Promise.resolve(value).then(_next, _throw);
}
}
function _asyncToGenerator(fn) {
return function() {
var self = this, args = arguments;
return new Promise(function(resolve, reject) {
var gen = fn.apply(self, args);
function _next(value) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
}
function _throw(err) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
}
_next(undefined);
});
};
}
function _f() {
_f = _asyncToGenerator(function*() {
});
return _f.apply(this, arguments);
}
function f() {
return _f.apply(this, arguments);
}

View File

@ -0,0 +1,27 @@
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
try {
var info = gen[key](arg), value = info.value;
} catch (error) {
reject(error);
return;
}
info.done ? resolve(value) : Promise.resolve(value).then(_next, _throw);
}
function _f() {
return (_f = (function(fn) {
return function() {
var self = this, args = arguments;
return new Promise(function(resolve, reject) {
var gen = fn.apply(self, args);
function _next(value) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
}
function _throw(err) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
}
_next(void 0);
});
};
})(function*() {
})).apply(this, arguments);
}

View File

@ -0,0 +1,5 @@
// @target: ES5
// @lib: es5,es2015.promise
// @noEmitHelpers: true
const x = (async)=>async
;

View File

@ -0,0 +1,36 @@
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
try {
var info = gen[key](arg);
var value = info.value;
} catch (error) {
reject(error);
return;
}
if (info.done) {
resolve(value);
} else {
Promise.resolve(value).then(_next, _throw);
}
}
function _asyncToGenerator(fn) {
return function() {
var self = this, args = arguments;
return new Promise(function(resolve, reject) {
var gen = fn.apply(self, args);
function _next(value) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
}
function _throw(err) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
}
_next(undefined);
});
};
}
// @target: ES5
// @lib: es5,es2015.promise
// @noEmitHelpers: true
var foo = _asyncToGenerator(function*() {
// Legal to use 'await' in a type context.
var v;
});

View File

@ -0,0 +1,25 @@
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
try {
var info = gen[key](arg), value = info.value;
} catch (error) {
reject(error);
return;
}
info.done ? resolve(value) : Promise.resolve(value).then(_next, _throw);
}
!function(fn) {
return function() {
var self = this, args = arguments;
return new Promise(function(resolve, reject) {
var gen = fn.apply(self, args);
function _next(value) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
}
function _throw(err) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
}
_next(void 0);
});
};
}(function*() {
});

View File

@ -0,0 +1,43 @@
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
try {
var info = gen[key](arg);
var value = info.value;
} catch (error) {
reject(error);
return;
}
if (info.done) {
resolve(value);
} else {
Promise.resolve(value).then(_next, _throw);
}
}
function _asyncToGenerator(fn) {
return function() {
var self = this, args = arguments;
return new Promise(function(resolve, reject) {
var gen = fn.apply(self, args);
function _next(value) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
}
function _throw(err) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
}
_next(undefined);
});
};
}
// @target: es5
// @lib: esnext, dom
// @downlevelIteration: true
// https://github.com/Microsoft/TypeScript/issues/24722
class A {
constructor(){
this.b = _asyncToGenerator((function*(...args) {
yield Promise.resolve();
const obj = {
["a"]: ()=>this
}; // computed property name after `await` triggers case
}).bind(this)).bind(this);
}
}

View File

@ -0,0 +1,34 @@
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
try {
var info = gen[key](arg);
var value = info.value;
} catch (error) {
reject(error);
return;
}
if (info.done) {
resolve(value);
} else {
Promise.resolve(value).then(_next, _throw);
}
}
function _asyncToGenerator(fn) {
return function() {
var self = this, args = arguments;
return new Promise(function(resolve, reject) {
var gen = fn.apply(self, args);
function _next(value) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
}
function _throw(err) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
}
_next(undefined);
});
};
}
// @target: ES5
// @lib: es5,es2015.promise
// @noEmitHelpers: true
var foo = _asyncToGenerator(function*() {
});

View File

@ -0,0 +1,25 @@
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
try {
var info = gen[key](arg), value = info.value;
} catch (error) {
reject(error);
return;
}
info.done ? resolve(value) : Promise.resolve(value).then(_next, _throw);
}
!function(fn) {
return function() {
var self = this, args = arguments;
return new Promise(function(resolve, reject) {
var gen = fn.apply(self, args);
function _next(value) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
}
function _throw(err) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
}
_next(void 0);
});
};
}(function*() {
});

View File

@ -0,0 +1,5 @@
// @target: ES5
// @lib: es5,es2015.promise
// @noEmitHelpers: true
var f = (_await)=>{
};

View File

@ -0,0 +1,5 @@
// @target: ES5
// @lib: es5,es2015.promise
// @noEmitHelpers: true
function f(_await = _await) {
}

View File

@ -0,0 +1,5 @@
// @target: ES5
// @lib: es5,es2015.promise
// @noEmitHelpers: true
var _await = ()=>{
};

View File

@ -0,0 +1,41 @@
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
try {
var info = gen[key](arg);
var value = info.value;
} catch (error) {
reject(error);
return;
}
if (info.done) {
resolve(value);
} else {
Promise.resolve(value).then(_next, _throw);
}
}
function _asyncToGenerator(fn) {
return function() {
var self = this, args = arguments;
return new Promise(function(resolve, reject) {
var gen = fn.apply(self, args);
function _next(value) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
}
function _throw(err) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
}
_next(undefined);
});
};
}
// @target: ES5
// @lib: es5,es2015.promise
// @noEmitHelpers: true
class C {
method() {
function other() {
}
var fn = _asyncToGenerator((function*() {
return yield other.apply(this, arguments);
}).bind(this)).bind(this);
}
}

View File

@ -0,0 +1,39 @@
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
try {
var info = gen[key](arg);
var value = info.value;
} catch (error) {
reject(error);
return;
}
if (info.done) {
resolve(value);
} else {
Promise.resolve(value).then(_next, _throw);
}
}
function _asyncToGenerator(fn) {
return function() {
var self = this, args = arguments;
return new Promise(function(resolve, reject) {
var gen = fn.apply(self, args);
function _next(value) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
}
function _throw(err) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
}
_next(undefined);
});
};
}
// @target: ES5
// @lib: es5,es2015.promise
// @noEmitHelpers: true
class C {
method() {
var fn = _asyncToGenerator((function*() {
return yield this;
}).bind(this)).bind(this);
}
}

View File

@ -0,0 +1,35 @@
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
try {
var info = gen[key](arg);
var value = info.value;
} catch (error) {
reject(error);
return;
}
if (info.done) {
resolve(value);
} else {
Promise.resolve(value).then(_next, _throw);
}
}
function _asyncToGenerator(fn) {
return function() {
var self = this, args = arguments;
return new Promise(function(resolve, reject) {
var gen = fn.apply(self, args);
function _next(value) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
}
function _throw(err) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
}
_next(undefined);
});
};
}
const x = _asyncToGenerator(function*(i) {
return yield someOtherFunction(i);
});
const x1 = _asyncToGenerator(function*(i) {
return yield someOtherFunction(i);
});

View File

@ -0,0 +1,29 @@
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
try {
var info = gen[key](arg), value = info.value;
} catch (error) {
reject(error);
return;
}
info.done ? resolve(value) : Promise.resolve(value).then(_next, _throw);
}
function _asyncToGenerator(fn) {
return function() {
var self = this, args = arguments;
return new Promise(function(resolve, reject) {
var gen = fn.apply(self, args);
function _next(value) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
}
function _throw(err) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
}
_next(void 0);
});
};
}
_asyncToGenerator(function*(i) {
return yield someOtherFunction(i);
}), _asyncToGenerator(function*(i) {
return yield someOtherFunction(i);
});

View File

@ -0,0 +1,149 @@
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
try {
var info = gen[key](arg);
var value = info.value;
} catch (error) {
reject(error);
return;
}
if (info.done) {
resolve(value);
} else {
Promise.resolve(value).then(_next, _throw);
}
}
function _asyncToGenerator(fn) {
return function() {
var self = this, args = arguments;
return new Promise(function(resolve, reject) {
var gen = fn.apply(self, args);
function _next(value) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
}
function _throw(err) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
}
_next(undefined);
});
};
}
function _f0() {
_f0 = _asyncToGenerator(function*() {
});
return _f0.apply(this, arguments);
}
function f0() {
return _f0.apply(this, arguments);
}
function _f1() {
_f1 = _asyncToGenerator(function*() {
});
return _f1.apply(this, arguments);
}
function f1() {
return _f1.apply(this, arguments);
}
function _f3() {
_f3 = _asyncToGenerator(function*() {
});
return _f3.apply(this, arguments);
}
function f3() {
return _f3.apply(this, arguments);
}
let f4 = function() {
var _ref = _asyncToGenerator(function*() {
});
return function() {
return _ref.apply(this, arguments);
};
}();
let f5 = function() {
var _ref = _asyncToGenerator(function*() {
});
return function() {
return _ref.apply(this, arguments);
};
}();
let f6 = function() {
var _ref = _asyncToGenerator(function*() {
});
return function() {
return _ref.apply(this, arguments);
};
}();
let f7 = _asyncToGenerator(function*() {
});
let f8 = _asyncToGenerator(function*() {
});
let f9 = _asyncToGenerator(function*() {
});
let f10 = _asyncToGenerator(function*() {
return p;
});
let f11 = _asyncToGenerator(function*() {
return mp;
});
let f12 = _asyncToGenerator(function*() {
return mp;
});
let f13 = _asyncToGenerator(function*() {
return p;
});
let o = {
m1 () {
return _asyncToGenerator(function*() {
})();
},
m2 () {
return _asyncToGenerator(function*() {
})();
},
m3 () {
return _asyncToGenerator(function*() {
})();
}
};
class C {
m1() {
return _asyncToGenerator(function*() {
})();
}
m2() {
return _asyncToGenerator(function*() {
})();
}
m3() {
return _asyncToGenerator(function*() {
})();
}
static m4() {
return _asyncToGenerator(function*() {
})();
}
static m5() {
return _asyncToGenerator(function*() {
})();
}
static m6() {
return _asyncToGenerator(function*() {
})();
}
}
var M;
(function(M) {
function _f1() {
_f1 = _asyncToGenerator(function*() {
});
return _f1.apply(this, arguments);
}
function f1() {
return _f1.apply(this, arguments);
}
M.f1 = f1;
})(M || (M = {
}));
// @target: ES5
// @lib: es5,es2015.promise
// @isolatedModules: true
export { };

View File

@ -0,0 +1,62 @@
var M;
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
try {
var info = gen[key](arg), value = info.value;
} catch (error) {
reject(error);
return;
}
info.done ? resolve(value) : Promise.resolve(value).then(_next, _throw);
}
function _asyncToGenerator(fn) {
return function() {
var self = this, args = arguments;
return new Promise(function(resolve, reject) {
var gen = fn.apply(self, args);
function _next(value) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
}
function _throw(err) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
}
_next(void 0);
});
};
}
function _f0() {
return (_f0 = _asyncToGenerator(function*() {
})).apply(this, arguments);
}
function _f1() {
return (_f1 = _asyncToGenerator(function*() {
})).apply(this, arguments);
}
function _f3() {
return (_f3 = _asyncToGenerator(function*() {
})).apply(this, arguments);
}
_asyncToGenerator(function*() {
}), _asyncToGenerator(function*() {
}), _asyncToGenerator(function*() {
}), _asyncToGenerator(function*() {
}), _asyncToGenerator(function*() {
}), _asyncToGenerator(function*() {
}), _asyncToGenerator(function*() {
return p;
}), _asyncToGenerator(function*() {
return mp;
}), _asyncToGenerator(function*() {
return mp;
}), _asyncToGenerator(function*() {
return p;
}), (function(M) {
function _f1() {
return (_f1 = _asyncToGenerator(function*() {
})).apply(this, arguments);
}
M.f1 = function() {
return _f1.apply(this, arguments);
};
})(M || (M = {
}));
export { };

View File

@ -0,0 +1,50 @@
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
try {
var info = gen[key](arg);
var value = info.value;
} catch (error) {
reject(error);
return;
}
if (info.done) {
resolve(value);
} else {
Promise.resolve(value).then(_next, _throw);
}
}
function _asyncToGenerator(fn) {
return function() {
var self = this, args = arguments;
return new Promise(function(resolve, reject) {
var gen = fn.apply(self, args);
function _next(value) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
}
function _throw(err) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
}
_next(undefined);
});
};
}
var _class;
// @target: ES5
// @lib: es5,es2015.promise
// @noEmitHelpers: true
// https://github.com/Microsoft/TypeScript/issues/20744
class A {
}
A.B = (_class = class B {
static func2() {
return new Promise((resolve)=>{
resolve(null);
});
}
}, _class.C = class C {
static func() {
return _asyncToGenerator(function*() {
yield _class.func2();
})();
}
}, _class);
A.B.C.func();

View File

@ -0,0 +1,39 @@
var _class;
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
try {
var info = gen[key](arg), value = info.value;
} catch (error) {
reject(error);
return;
}
info.done ? resolve(value) : Promise.resolve(value).then(_next, _throw);
}
class A {
}
(_class = class {
static func2() {
return new Promise((resolve)=>{
resolve(null);
});
}
}).C = class {
static func() {
return (function(fn) {
return function() {
var self = this, args = arguments;
return new Promise(function(resolve, reject) {
var gen = fn.apply(self, args);
function _next(value) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
}
function _throw(err) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
}
_next(void 0);
});
};
})(function*() {
yield _class.func2();
})();
}
}, A.B = _class, A.B.C.func();

View File

@ -0,0 +1,157 @@
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
try {
var info = gen[key](arg);
var value = info.value;
} catch (error) {
reject(error);
return;
}
if (info.done) {
resolve(value);
} else {
Promise.resolve(value).then(_next, _throw);
}
}
function _asyncToGenerator(fn) {
return function() {
var self = this, args = arguments;
return new Promise(function(resolve, reject) {
var gen = fn.apply(self, args);
function _next(value) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
}
function _throw(err) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
}
_next(undefined);
});
};
}
function _f0() {
_f0 = _asyncToGenerator(function*() {
});
return _f0.apply(this, arguments);
}
function f0() {
return _f0.apply(this, arguments);
}
function _f1() {
_f1 = _asyncToGenerator(function*() {
});
return _f1.apply(this, arguments);
}
function f1() {
return _f1.apply(this, arguments);
}
function _f3() {
_f3 = _asyncToGenerator(function*() {
});
return _f3.apply(this, arguments);
}
function f3() {
return _f3.apply(this, arguments);
}
let f4 = function() {
var _ref = _asyncToGenerator(function*() {
});
return function() {
return _ref.apply(this, arguments);
};
}();
let f5 = function() {
var _ref = _asyncToGenerator(function*() {
});
return function() {
return _ref.apply(this, arguments);
};
}();
let f6 = function() {
var _ref = _asyncToGenerator(function*() {
});
return function() {
return _ref.apply(this, arguments);
};
}();
let f7 = _asyncToGenerator(function*() {
});
let f8 = _asyncToGenerator(function*() {
});
let f9 = _asyncToGenerator(function*() {
});
let f10 = _asyncToGenerator(function*() {
return p;
});
let f11 = _asyncToGenerator(function*() {
return mp;
});
let f12 = _asyncToGenerator(function*() {
return mp;
});
let f13 = _asyncToGenerator(function*() {
return p;
});
let o = {
m1 () {
return _asyncToGenerator(function*() {
})();
},
m2 () {
return _asyncToGenerator(function*() {
})();
},
m3 () {
return _asyncToGenerator(function*() {
})();
}
};
class C {
m1() {
return _asyncToGenerator(function*() {
})();
}
m2() {
return _asyncToGenerator(function*() {
})();
}
m3() {
return _asyncToGenerator(function*() {
})();
}
static m4() {
return _asyncToGenerator(function*() {
})();
}
static m5() {
return _asyncToGenerator(function*() {
})();
}
static m6() {
return _asyncToGenerator(function*() {
})();
}
}
var M;
(function(M) {
function _f1() {
_f1 = _asyncToGenerator(function*() {
});
return _f1.apply(this, arguments);
}
function f1() {
return _f1.apply(this, arguments);
}
M.f1 = f1;
})(M || (M = {
}));
function _f14() {
_f14 = _asyncToGenerator(function*() {
block: {
yield 1;
break block;
}
});
return _f14.apply(this, arguments);
}
function f14() {
return _f14.apply(this, arguments);
}

View File

@ -0,0 +1,69 @@
var M;
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
try {
var info = gen[key](arg), value = info.value;
} catch (error) {
reject(error);
return;
}
info.done ? resolve(value) : Promise.resolve(value).then(_next, _throw);
}
function _asyncToGenerator(fn) {
return function() {
var self = this, args = arguments;
return new Promise(function(resolve, reject) {
var gen = fn.apply(self, args);
function _next(value) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
}
function _throw(err) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
}
_next(void 0);
});
};
}
function _f0() {
return (_f0 = _asyncToGenerator(function*() {
})).apply(this, arguments);
}
function _f1() {
return (_f1 = _asyncToGenerator(function*() {
})).apply(this, arguments);
}
function _f3() {
return (_f3 = _asyncToGenerator(function*() {
})).apply(this, arguments);
}
function _f14() {
return (_f14 = _asyncToGenerator(function*() {
block: {
yield 1;
break block;
}
})).apply(this, arguments);
}
_asyncToGenerator(function*() {
}), _asyncToGenerator(function*() {
}), _asyncToGenerator(function*() {
}), _asyncToGenerator(function*() {
}), _asyncToGenerator(function*() {
}), _asyncToGenerator(function*() {
}), _asyncToGenerator(function*() {
return p;
}), _asyncToGenerator(function*() {
return mp;
}), _asyncToGenerator(function*() {
return mp;
}), _asyncToGenerator(function*() {
return p;
}), (function(M) {
function _f1() {
return (_f1 = _asyncToGenerator(function*() {
})).apply(this, arguments);
}
M.f1 = function() {
return _f1.apply(this, arguments);
};
})(M || (M = {
}));

View File

@ -0,0 +1,42 @@
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
try {
var info = gen[key](arg);
var value = info.value;
} catch (error) {
reject(error);
return;
}
if (info.done) {
resolve(value);
} else {
Promise.resolve(value).then(_next, _throw);
}
}
function _asyncToGenerator(fn) {
return function() {
var self = this, args = arguments;
return new Promise(function(resolve, reject) {
var gen = fn.apply(self, args);
function _next(value) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
}
function _throw(err) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
}
_next(undefined);
});
};
}
// @target: es5
// @lib: es5,es2015.promise
// @module: commonjs
// @filename: task.ts
export class Task extends Promise {
}
class Test {
example() {
return _asyncToGenerator(function*() {
return;
})();
}
}

View File

@ -0,0 +1,2 @@
export class Task extends Promise {
}

View File

@ -0,0 +1,97 @@
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
try {
var info = gen[key](arg);
var value = info.value;
} catch (error) {
reject(error);
return;
}
if (info.done) {
resolve(value);
} else {
Promise.resolve(value).then(_next, _throw);
}
}
function _asyncToGenerator(fn) {
return function() {
var self = this, args = arguments;
return new Promise(function(resolve, reject) {
var gen = fn.apply(self, args);
function _next(value) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
}
function _throw(err) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
}
_next(undefined);
});
};
}
// @target: ES5
// @lib: es5,es2015.promise
// @noEmitHelpers: true
class A {
x() {
}
y() {
}
}
class B extends A {
// async method with only call/get on 'super' does not require a binding
simple() {
var _super_x = (..._args)=>super.x(..._args)
, _super_y = (..._args)=>super.y(..._args)
, _super_method = (..._args)=>super["x"](..._args)
, _super_x1 = ()=>super.x
, _super_method1 = ()=>super["x"]
;
return _asyncToGenerator(function*() {
// call with property access
_super_x();
// call additional property.
_super_y();
// call with element access
_super_method();
// property access (read)
const a = _super_x1();
// element access (read)
const b = _super_method1();
})();
}
// async method with assignment/destructuring on 'super' requires a binding
advanced() {
var _super_x = (..._args)=>super.x(..._args)
, _super_method = (..._args)=>super["x"](..._args)
, _super_x3 = ()=>super.x
, _super_method3 = ()=>super["x"]
, _super_x4 = (_args)=>// property access (assign)
super.x = _args
, _super_method4 = (_args)=>// element access (assign)
super["x"] = _args
, _super_x5 = ()=>super.x
, _super_method5 = ()=>super["x"]
;
return _asyncToGenerator(function*() {
const f = ()=>{
};
// call with property access
_super_x();
// call with element access
_super_method();
// property access (read)
const a = _super_x3();
// element access (read)
const b = _super_method3();
_super_x4(f);
_super_method4(f);
// destructuring assign with property access
({ f: _super_x5() } = {
f
});
// destructuring assign with element access
({ f: _super_method5() } = {
f
});
})();
}
}

View File

@ -0,0 +1,43 @@
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
try {
var info = gen[key](arg);
var value = info.value;
} catch (error) {
reject(error);
return;
}
if (info.done) {
resolve(value);
} else {
Promise.resolve(value).then(_next, _throw);
}
}
function _asyncToGenerator(fn) {
return function() {
var self = this, args = arguments;
return new Promise(function(resolve, reject) {
var gen = fn.apply(self, args);
function _next(value) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
}
function _throw(err) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
}
_next(undefined);
});
};
}
function _f() {
_f = // @target: es5
// @lib: es5,es2015.promise
// @filename: a.ts
_asyncToGenerator(function*() {
});
return _f.apply(this, arguments);
}
function f() {
return _f.apply(this, arguments);
}
// @filename: b.ts
function g() {
}

View File

@ -0,0 +1,27 @@
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
try {
var info = gen[key](arg), value = info.value;
} catch (error) {
reject(error);
return;
}
info.done ? resolve(value) : Promise.resolve(value).then(_next, _throw);
}
function _f() {
return (_f = (function(fn) {
return function() {
var self = this, args = arguments;
return new Promise(function(resolve, reject) {
var gen = fn.apply(self, args);
function _next(value) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
}
function _throw(err) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
}
_next(void 0);
});
};
})(function*() {
})).apply(this, arguments);
}

View File

@ -0,0 +1,39 @@
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
try {
var info = gen[key](arg);
var value = info.value;
} catch (error) {
reject(error);
return;
}
if (info.done) {
resolve(value);
} else {
Promise.resolve(value).then(_next, _throw);
}
}
function _asyncToGenerator(fn) {
return function() {
var self = this, args = arguments;
return new Promise(function(resolve, reject) {
var gen = fn.apply(self, args);
function _next(value) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
}
function _throw(err) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
}
_next(undefined);
});
};
}
function _func() {
_func = _asyncToGenerator(function*() {
"use strict";
var b = (yield p) || a;
});
return _func.apply(this, arguments);
}
function func() {
return _func.apply(this, arguments);
}

Some files were not shown because too many files have changed in this diff Show More