版博士V2.0程序
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 
 
 

25 řádky
594 B

  1. import { PluginFunc, ConfigType } from 'dayjs/esm'
  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/esm' {
  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. }