@vnmfify/core
Version:
```shell npm i @vnmfify/core -S ```
17 lines (16 loc) • 457 B
TypeScript
import { CurrentTime } from "./countdown.shared";
export interface UseCountdownOptions {
value: number;
autostart?: boolean;
interval?: number;
onChange?(current: CurrentTime): void;
onComplete?(): void;
}
export default function useCountdown(options: UseCountdownOptions): {
current: CurrentTime;
start: () => void;
reset: () => void;
restart: () => void;
pause: () => void;
stop: () => void;
};