UNPKG

742 BTypeScriptView Raw
1import { VNodeTypes } from 'vue';
2export declare type valueType = number | string;
3export declare type countdownValueType = valueType | string;
4export declare type Formatter = false | 'number' | 'countdown' | (({ value, config }: {
5 value: valueType;
6 config?: FormatConfig;
7}) => VNodeTypes);
8export interface FormatConfig {
9 formatter?: Formatter;
10 decimalSeparator?: string;
11 groupSeparator?: string;
12 precision?: number;
13 prefixCls?: string;
14}
15export interface CountdownFormatConfig extends FormatConfig {
16 format?: string;
17}
18export declare function formatTimeStr(duration: number, format: string): string;
19export declare function formatCountdown(value: countdownValueType, config: CountdownFormatConfig): string;