const debounce = void>( func: T, wait: number = 500 ): ((...args: Parameters) => void) => { let timeout: ReturnType | null; return (...args: Parameters) => { if (timeout !== null) { clearTimeout(timeout); } timeout = setTimeout(() => { func(...args); }, wait); }; }; const isEmptyObject = (obj: any) => { if (obj.hasOwnProperty('filters')) { return obj === null || obj === undefined || Object.keys(obj).length === 0 || obj.filters === null; } else { return obj === null || obj === undefined || Object.keys(obj).length === 0; } }; export { debounce, isEmptyObject };