/** * Calls the given async callback at a target interval. * * If the callback takes less time than the target interval, the target interval * for the next tick will be adjusted to target the remaining time in the current * interval. * * e.g. If the target interval is 1000ms, and the callback takes 50ms to resolve, * the next tick will be scheduled for 950ms from now via `setTimeout(callback, 950)`. * * If the callback takes longer than the target interval, the next tick will be * scheduled immediately via `setTimeout(callback, 0)`. In such cases, the time * between ticks may be > than the target interval, but this guarantees that * a callback won't be scheduled until after the previous one has resolved. * @param callback Callback to call at the target interval * @param targetIntervalMs Target interval in milliseconds to call the callback */ export declare function useAsyncInterval(callback: () => Promise, targetIntervalMs: number): void; export default useAsyncInterval; //# sourceMappingURL=useAsyncInterval.d.ts.map