export default function debounce any>(func: T, wait?: number, immediate?: boolean): T & { clear: () => void; flush: () => void; };