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
When the return value of an async operation is not assigned to a variable, then the result translates into a single expression and it raises a JSHint error.
set timeout! ^ 1000
log "Hello World!"
translates to
(function(){varPromise=require("bluebird");vargen1_promisify=function(fn){returnnewPromise(function(onFulfilled,onRejected){fn(function(error,result){if(error){onRejected(error);}else{onFulfilled(result);}});});};varself=this;vargen2_asyncResult;newPromise(function(gen3_onFulfilled){gen3_onFulfilled(gen1_promisify(function(gen4_callback){returnsetTimeout(gen4_callback,1e3);}).then(function(gen2_asyncResult){gen2_asyncResult;// <===== the JSHint error is herereturnlog("Hello World!");}));});}).call(this);
JSHint error on line 20:
20: Expected an assignment or function call and instead saw an expression
The text was updated successfully, but these errors were encountered:
When the return value of an async operation is not assigned to a variable, then the result translates into a single expression and it raises a JSHint error.
translates to
JSHint error on line 20:
The text was updated successfully, but these errors were encountered: