Skip to content

Commit 5c08d4b

Browse files
committed
[eventloop] update typings of eventloop.debounce
1 parent dbc6230 commit 5c08d4b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

eventloop.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ export const createDebouncer = (timeout, triggerAfter = -1) => {
105105
*/
106106
let lastCall = null
107107
/**
108-
* @param {(()=>void)?} cb function to trigger after debounce. If null, it will reset the
108+
* @param {((...args: any)=>void)?} cb function to trigger after debounce. If null, it will reset the
109109
* debounce.
110110
*/
111111
return cb => {

eventloop.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,10 @@ export const testIdleCallback = async _tc => {
8181
export const testDebouncer = async _tc => {
8282
const debounce = eventloop.createDebouncer(10)
8383
let calls = 0
84-
debounce(() => {
84+
debounce((_x) => {
8585
calls++
8686
})
87-
debounce(() => {
87+
debounce((_y, _z) => {
8888
calls++
8989
})
9090
t.assert(calls === 0)

0 commit comments

Comments
 (0)