fix(all): updated tslint rules to latest

This commit is contained in:
Manu Mtz.-Almeida
2018-07-29 13:03:47 +02:00
parent d1969bdf1d
commit 92e21a8cf3
112 changed files with 546 additions and 574 deletions

View File

@ -47,13 +47,13 @@ export function pointerCoord(ev: any): {x: number, y: number} {
const changedTouches = ev.changedTouches;
if (changedTouches && changedTouches.length > 0) {
const touch = changedTouches[0];
return {x: touch.clientX, y: touch.clientY};
return { x: touch.clientX, y: touch.clientY };
}
if (ev.pageX !== undefined) {
return {x: ev.pageX, y: ev.pageY};
return { x: ev.pageX, y: ev.pageY };
}
}
return {x: 0, y: 0};
return { x: 0, y: 0 };
}
/**
@ -85,8 +85,8 @@ export function debounceEvent(event: EventEmitter, wait: number): EventEmitter {
} as EventEmitter;
}
export function debounce(func: Function, wait = 0) {
let timer: number;
export function debounce(func: (...args: any[]) => void, wait = 0) {
let timer: any;
return (...args: any[]): void => {
clearTimeout(timer);
timer = setTimeout(func, wait, ...args);