chore: update tslint rules (#7391)

This commit is contained in:
Manol Donev
2019-06-26 15:13:48 +03:00
committed by GitHub
parent 92370279d8
commit 4f39fb728b
399 changed files with 3101 additions and 2210 deletions

View File

@@ -1,4 +1,4 @@
/**
/**
* Android specific timer functions implementation.
*/
let timeoutHandler;
@@ -11,6 +11,7 @@ function createHandlerAndGetId(): number {
}
timerId++;
return timerId;
}

View File

@@ -4,20 +4,21 @@ let timerId = 0;
interface KeyValuePair<K, V> {
k: K;
v: V
v: V;
}
class TimerTargetImpl extends NSObject {
private callback: Function;
private disposed: boolean;
private id: number
private shouldRepeat: boolean
private id: number;
private shouldRepeat: boolean;
public static initWithCallback(callback: Function, id: number, shouldRepeat: boolean): TimerTargetImpl {
let handler = <TimerTargetImpl>TimerTargetImpl.new();
handler.callback = callback;
handler.id = id;
handler.shouldRepeat = shouldRepeat;
return handler;
}
@@ -63,6 +64,7 @@ function createTimerAndGetId(callback: Function, milliseconds: number, shouldRep
export function setTimeout(callback: Function, milliseconds = 0, ...args): number {
let invoke = () => callback(...args);
return createTimerAndGetId(zonedCallback(invoke), milliseconds, false);
}
@@ -75,6 +77,7 @@ export function clearTimeout(id: number): void {
export function setInterval(callback: Function, milliseconds = 0, ...args): number {
let invoke = () => callback(...args);
return createTimerAndGetId(zonedCallback(invoke), milliseconds, true);
}