utils.d.ts 664 B

1234567891011121314151617181920212223
  1. export interface TimeData {
  2. days: number;
  3. hours: number;
  4. minutes: number;
  5. seconds: number;
  6. milliseconds: number;
  7. }
  8. export declare const parseTimeData: (time: number) => TimeData;
  9. export declare const isSameSecond: (time1: number, time2: number) => boolean;
  10. export declare type TTimeList = {
  11. digit: string;
  12. unit: string;
  13. match: string;
  14. }[];
  15. /**
  16. *
  17. * @param time 倒计时时间,毫秒单位
  18. * @param format 倒计时格式化字符串,例如:dd天hh小时mm分ss秒SSS毫秒,hh:mm:ss.SSS,hh:mm:ss
  19. */
  20. export declare const parseFormat: (time: number, format: string) => {
  21. timeText: string;
  22. timeList: TTimeList;
  23. };