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
The snippet above will throw an error instead of printing "Pass" after esbuild transformation.
The transformed result is:
(()=>{var__async=(__this,__arguments,generator)=>{returnnewPromise((resolve,reject)=>{varfulfilled=(value)=>{try{step(generator.next(value));}catch(e){reject(e);}};varrejected=(value)=>{try{step(generator.throw(value));}catch(e){reject(e);}};varstep=(result)=>{returnresult.done ? resolve(result.value) : Promise.resolve(result.value).then(fulfilled,rejected);};step((generator=generator.apply(__this,__arguments)).next());});};// src/index.tsconstmyFunc=function(c){return{foo: (_0)=>__async(this,arguments,function*(message,options={}){// ^^^^^^^^^// Notice that `arguments` here is incorrect, since arrow function does// not provide arguments.if(message.a!=="1"){thrownewError("foo");}console.log("Pass!");})};};myFunc({}).foo({a: "1"});})();
The text was updated successfully, but these errors were encountered:
The snippet above will throw an error instead of printing "Pass" after esbuild transformation.
The transformed result is:
The text was updated successfully, but these errors were encountered: