Skip to content

Commit ac3a164

Browse files
committed
Type fix
1 parent d413cb4 commit ac3a164

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/index.ts

+2-3
Original file line numberDiff line numberDiff line change
@@ -996,10 +996,9 @@ export class WhatsAppAPI<EmittersReturnType = void> {
996996
* Offload a function to the next tick of the event loop
997997
*
998998
* @param f - The function to offload from the main thread
999-
* @param a - The arguments to pass to the function
1000999
*/
1001-
static offload<A, F extends (...a: A[]) => unknown>(f: F, ...a: A[]) {
1000+
static offload(f: () => unknown) {
10021001
// Thanks @RahulLanjewar93
1003-
Promise.resolve().then(() => f(...a));
1002+
Promise.resolve().then(f);
10041003
}
10051004
}

0 commit comments

Comments
 (0)