mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
chore: eslint cleanup (#10160)
This commit is contained in:
@@ -159,11 +159,11 @@ export function debounce(fn: any, delay = 300) {
|
||||
};
|
||||
}
|
||||
|
||||
export function throttle(fn: any, delay = 300) {
|
||||
export function throttle(fn: Function, delay = 300) {
|
||||
let waiting = false;
|
||||
return function () {
|
||||
return function (...args) {
|
||||
if (!waiting) {
|
||||
fn.apply(this, arguments);
|
||||
fn.apply(this, args);
|
||||
waiting = true;
|
||||
setTimeout(function () {
|
||||
waiting = false;
|
||||
|
||||
Reference in New Issue
Block a user