You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 1, 2025. It is now read-only.
The following code works in the Chrome console but not with a babelified code, the result of instanceof is always true:
constAsyncFunction=Object.getPrototypeOf(async()=>{}).constructor;asyncfunctionasyncMethod(){}functionmethod(){}console.log(asyncMethodinstanceofAsyncFunction)// trueconsole.log(methodinstanceofAsyncFunction)// false, but true with babelified codeconsole.log(asyncMethod.constructor.name)// should be "AsyncFunction", but "Function" with babelified code
I don't know if this is the role of regenerator or babel, here is the corresponding issue on the babel repo: babel/babel#8642
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I haven't seen any mention of
AsyncFunction
in regenerator, are there any plans to create a polyfill or something like that?https://developer.mozilla.org/fr/docs/Web/JavaScript/Reference/Global_Objects/AsyncFunction
The following code works in the Chrome console but not with a babelified code, the result of
instanceof
is always true:I don't know if this is the role of regenerator or babel, here is the corresponding issue on the babel repo: babel/babel#8642
The text was updated successfully, but these errors were encountered: