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
Make use of JS rest and spread operators throughout the codebase. NFC
Following up on #21270. These operators were introduced way before
our current default set of browser versions. Anyone targeting an
browser so old as to not support these will already be on the
transpilation path.
throwBindingError(`Function '${humanName}' called with an invalid number of arguments (${arguments.length}) - expects one of (${proto[methodName].overloadTable})!`);
throwBindingError(`Function '${humanName}' called with an invalid number of arguments (${args.length}) - expects one of (${proto[methodName].overloadTable})!`);
thrownewBindingError(`Tried to invoke ctor of ${name} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(registeredClass.constructor_body).toString()}) parameters instead!`);
1777
+
thrownewBindingError(`Tried to invoke ctor of ${name} with invalid number of parameters (${args.length}) - expected (${Object.keys(registeredClass.constructor_body).toString()}) parameters instead!`);
Copy file name to clipboardExpand all lines: src/library_async.js
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -68,10 +68,10 @@ addToLibrary({
68
68
}
69
69
#endif
70
70
#if ASSERTIONS&&ASYNCIFY!=2// We cannot apply assertions with stack switching, as the imports must not be modified from suspender.suspendOnReturnedPromise TODO find a way
71
-
imports[x]=function(){
71
+
imports[x]=(...args)=>{
72
72
varoriginalAsyncifyState=Asyncify.state;
73
73
try{
74
-
returnoriginal.apply(null,arguments);
74
+
returnoriginal.apply(null,args);
75
75
}finally{
76
76
// Only asyncify-declared imports are allowed to change the
0 commit comments