6388a5400d8c6355d2e04faf0070761fe6c3407642460c3f77c0613ba913d400781321c1589406c2c057fb1ec98bb5cc0034c305107e52c40783c1239dc76d 586 B

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