chore: eslint cleanup (#10160)

This commit is contained in:
farfromrefuge
2023-01-09 17:40:20 +00:00
committed by GitHub
parent bff35e5163
commit 0632215793
18 changed files with 97 additions and 71 deletions

View File

@@ -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;