import { Observable, ObservableMaybe } from 'woby'; interface UseCountdownType { seconds: ObservableMaybe; interval: ObservableMaybe; isIncrement?: ObservableMaybe; } interface CountdownHelpers { start: () => void; stop: () => void; reset: () => void; } interface CountdownOption { countStart: ObservableMaybe; intervalMs?: ObservableMaybe; isIncrement?: ObservableMaybe; countStop?: ObservableMaybe; } interface CountdownControllers { startCountdown: () => void; stopCountdown: () => void; resetCountdown: () => void; } /** * * @param {UseCountdownType} countdownOption * @param {number} countdownOption.seconds the countdown's number, generally time seconds * @param {number} countdownOption.interval the countdown's interval, milliseconds * @param {?boolean} countdownOption.isIncrement false by default, determine the countdown is increment, otherwise is decrement * @returns [counter, CountdownControllers] * * @deprecated new useCountdown interface is already available (see https://use-woby.com/react-hook/use-countdown), the old version will retire on use-woby@3 */ export declare function useCountdown(countdownOption: UseCountdownType): [Observable, CountdownHelpers]; /** * New interface with default value *D * @param {CountdownOption} countdownOption * @param {number} countdownOption.countStart - the countdown's starting number, initial value of the returned number. * @param {?number} countdownOption.countStop - `0` by default, the countdown's stopping number. Pass `-Infinity` to decrease forever. * @param {?number} countdownOption.intervalMs - `1000` by default, the countdown's interval, in milliseconds. * @param {?boolean} countdownOption.isIncrement - `false` by default, true if the countdown is increment. * @returns [counter, CountdownControllers] */ export declare function useCountdown(countdownOption: CountdownOption): [Observable, CountdownControllers]; export {}; //# sourceMappingURL=useCountdown.d.ts.map