If it is not a function, it is internally replaced with an "Identity" function (it returns the received argument).
Right now asyncify always replaces A.then(B) with await B(await A) if B isn't a function expression. I need to walk the scope to determine if it's a function expression or not, and if it's impossible to tell, replace with a runtime check and developer warning.
I forgot about this important detail of
.then
:Right now asyncify always replaces
A.then(B)
withawait B(await A)
if B isn't a function expression. I need to walk the scope to determine if it's a function expression or not, and if it's impossible to tell, replace with a runtime check and developer warning.