diff options
Diffstat (limited to 'js/timers.ts')
-rw-r--r-- | js/timers.ts | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/js/timers.ts b/js/timers.ts index 83f285f12..35744f672 100644 --- a/js/timers.ts +++ b/js/timers.ts @@ -167,7 +167,9 @@ function fireTimers() { setGlobalTimeout(nextTimerDue, now); } -function setTimer<Args extends Array<unknown>>( +export type Args = any[]; // tslint:disable-line:no-any + +function setTimer( cb: (...args: Args) => void, delay: number, args: Args, @@ -198,7 +200,7 @@ function setTimer<Args extends Array<unknown>>( } /** Sets a timer which executes a function once after the timer expires. */ -export function setTimeout<Args extends Array<unknown>>( +export function setTimeout( cb: (...args: Args) => void, delay: number, ...args: Args @@ -207,7 +209,7 @@ export function setTimeout<Args extends Array<unknown>>( } /** Repeatedly calls a function , with a fixed time delay between each call. */ -export function setInterval<Args extends Array<unknown>>( +export function setInterval( cb: (...args: Args) => void, delay: number, ...args: Args |