declare type Running = boolean; declare type StartInterval = () => void; declare type StopInterval = () => void; declare type ReturnValue = [Running, StartInterval, StopInterval]; /** * Simple hook to use an interval with auto setup and teardown. The provided * functions will be guaranteed to not change and are memoized. * * @param callback The callback function to call * @param delay The time in milliseconds the timer should delay between * executions of the callback function * @param defaultRunning Boolean if the interval should be started immediately * @return a list containing a boolean if the interval is running, function to * start the interval, and a function to stop the interval. */ export default function useInterval(callback: (stop: () => void) => void, delay: number, defaultRunning?: boolean): ReturnValue; export {};