-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Closed
Labels
outdatedA closed issue/PR that is archived due to age. Recommended to make a new issueA closed issue/PR that is archived due to age. Recommended to make a new issue
Description
Input Code
function foo({param}) {}
console.log(foo.length); // 1
async function bar({param}) {}
console.log(bar.length); // 0 (!)Babel Configuration (.babelrc, package.json, cli command)
{
"plugins": [
"transform-async-to-generator"
]
}Expected Behavior
bar.length should be 1, as foo.length is.
Current Behavior
Function bar is being transformed as a function without any params:
let bar = (() => {
var _ref = _asyncToGenerator(function* ({ param }) {});
return function bar() {
return _ref.apply(this, arguments);
};
})();Possible Solution
I guess that's a regression from #4901.
Your Environment
| software | version |
|---|---|
| Babel | 6.20 |
| node | 7.2.1 |
| yarn | 0.17.10 |
| Operating System | Arch Linux |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
outdatedA closed issue/PR that is archived due to age. Recommended to make a new issueA closed issue/PR that is archived due to age. Recommended to make a new issue