1 | import { PluginFunc, ConfigType } from 'dayjs'
|
2 |
|
3 | declare interface RelativeTimeThreshold {
|
4 | l: string
|
5 | r?: number
|
6 | d?: string
|
7 | }
|
8 |
|
9 | declare interface RelativeTimeOptions {
|
10 | rounding?: (num: number) => number
|
11 | thresholds?: RelativeTimeThreshold[]
|
12 | }
|
13 |
|
14 | declare const plugin: PluginFunc<RelativeTimeOptions>
|
15 | export = plugin
|
16 |
|
17 | declare module 'dayjs' {
|
18 | interface Dayjs {
|
19 | fromNow(withoutSuffix?: boolean): string
|
20 | from(compared: ConfigType, withoutSuffix?: boolean): string
|
21 | toNow(withoutSuffix?: boolean): string
|
22 | to(compared: ConfigType, withoutSuffix?: boolean): string
|
23 | }
|
24 | }
|