1 | import dayjs from 'dayjs';
|
2 | export type TDate = dayjs.ConfigType;
|
3 | export interface Options {
|
4 | leftTime?: number;
|
5 | targetDate?: TDate;
|
6 | interval?: number;
|
7 | onEnd?: () => void;
|
8 | }
|
9 | export interface FormattedRes {
|
10 | days: number;
|
11 | hours: number;
|
12 | minutes: number;
|
13 | seconds: number;
|
14 | milliseconds: number;
|
15 | }
|
16 | declare const useCountdown: (options?: Options) => readonly [number, FormattedRes];
|
17 | export default useCountdown;
|