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