mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
Specifications define timers capable of accepting optional parameters. https://www.w3.org/TR/2011/WD-html5-20110525/timers.html#timers This PR goal is to standardize such behavior in NativeScript too.
This commit is contained in:
committed by
Alexander Vakrilov
parent
9866350559
commit
7e39bfb9d4
6
tns-core-modules/timer/timer.d.ts
vendored
6
tns-core-modules/timer/timer.d.ts
vendored
@@ -7,8 +7,9 @@
|
||||
* Calls a function after a specified delay.
|
||||
* @param callback The function to be called.
|
||||
* @param milliseconds The time to wait before the function is called. Defaults to 0.
|
||||
* @param args One or more parameter to use once the function is called. Defaults to no parameters.
|
||||
*/
|
||||
export function setTimeout(callback: Function, milliseconds?: number): number;
|
||||
export function setTimeout(callback: Function, milliseconds?: number, ...args: any[]): number;
|
||||
|
||||
/**
|
||||
* Clears the delay set by a call to the setTimeout function.
|
||||
@@ -20,8 +21,9 @@ export function clearTimeout(id: number): void;
|
||||
* Calls a function repeatedly with a delay between each call.
|
||||
* @param callback The function to be called.
|
||||
* @param milliseconds The delay between each function call.
|
||||
* @param args One or more parameter to use once the function is called. Defaults to no parameters.
|
||||
*/
|
||||
export function setInterval(callback: Function, milliseconds?: number): number;
|
||||
export function setInterval(callback: Function, milliseconds?: number, ...args: any[]): number;
|
||||
|
||||
/**
|
||||
* Clears repeated function which was set up by calling setInterval().
|
||||
|
||||
Reference in New Issue
Block a user