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
// async.js L192-211functionasyncify(func){returninitialParams(function(args,callback){varresult;try{result=func.apply(this,args);}catch(e){returncallback(e);}// if result is Promise objectif(isObject(result)&&typeofresult.then==='function'){result.then(function(value){invokeCallback(callback,null,value);},function(err){invokeCallback(callback,err.message ? err : newError(err));});}else{callback(null,result);}});}
本来想调试简单一些,直接使用node的async、await,就将target调整为es2017,不用typescript的tslib,结果报done不存在了。
如果调整target为es2017的话async库的调用方式不一样,会走asyncify不传递callback
我将代码调整了一下,大佬要不要参考一下
The text was updated successfully, but these errors were encountered: