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