mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-11 12:30:18 +00:00
Added missing ...args to setInterval, setTimeout (#21020)
The methods should be able to take them.
This commit is contained in:
committed by
Sheetal Nandi
parent
8a6a758e90
commit
fe25b8915d
Vendored
+4
-2
@@ -70,9 +70,10 @@ export interface LolexClock<TTimerId extends TimerId> {
|
||||
*
|
||||
* @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<TTimerId extends TimerId> {
|
||||
*
|
||||
* @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.
|
||||
|
||||
Reference in New Issue
Block a user