From fe25b8915d6520837ddb6dcd022bdb74fbe7a0d8 Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Thu, 26 Oct 2017 11:47:28 -0700 Subject: [PATCH] Added missing ...args to setInterval, setTimeout (#21020) The methods should be able to take them. --- types/lolex/index.d.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/types/lolex/index.d.ts b/types/lolex/index.d.ts index de08060883..c0dec4cd56 100644 --- a/types/lolex/index.d.ts +++ b/types/lolex/index.d.ts @@ -70,9 +70,10 @@ export interface LolexClock { * * @param callback Callback to be fired. * @param timeout How many ticks to wait to run the callback. + * @param args Any extra arguments to pass to the callback. * @returns Time identifier for cancellation. */ - setTimeout(callback: () => any, timeout: number): TTimerId; + setTimeout(callback: () => any, timeout: number, ...args: any[]): TTimerId; /** * Clears a timer, as long as it was created using setTimeout. @@ -86,9 +87,10 @@ export interface LolexClock { * * @param callback Callback to be fired. * @param timeout How many ticks to wait between callbacks. + * @param args Any extra arguments to pass to the callback. * @returns Time identifier for cancellation. */ - setInterval(callback: () => any, timeout: number): TTimerId; + setInterval(callback: () => any, timeout: number, ...args: any[]): TTimerId; /** * Clears a timer, as long as it was created using setInterval.