import throttleFunction from 'throttleit'; export function throttle any>( fn: T, waitMs: number | undefined, ): T { return waitMs != null ? throttleFunction(fn, waitMs) : fn; }