packages/babel-plugin-transform-async-to-generator/test/fixtures/regression/4943/output.js
raw symbols SCIP| 1 | "use strict"; |
| 2 | |
| 3 | function mandatory(paramName) { |
| 4 | throw new Error(`Missing parameter: ${paramName}`); |
| 5 | } |
| 6 | function foo(_x) { |
| 7 | return _foo.apply(this, arguments); |
| 8 | } |
| 9 | function _foo() { |
| 10 | _foo = babelHelpers.asyncToGenerator(function (_ref) { |
| 11 | let a = _ref.a, |
| 12 | _ref$b = _ref.b, |
| 13 | b = _ref$b === void 0 ? mandatory("b") : _ref$b; |
| 14 | return function* () { |
| 15 | return Promise.resolve(b); |
| 16 | }(); |
| 17 | }); |
| 18 | return _foo.apply(this, arguments); |
| 19 | } |