Skip to content

Commit

Permalink
fix: update type file .diff (#1505)
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacl committed Jun 2, 2021
1 parent bb5df55 commit 6508494
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion types/index.d.ts
Expand Up @@ -286,7 +286,9 @@ declare namespace dayjs {
* const date1 = dayjs('2019-01-25')
* const date2 = dayjs('2018-06-05')
* date1.diff(date2) // 20214000000 default milliseconds
* date1.diff() // milliseconds to current time
* ```
*
* To get the difference in another unit of measurement, pass that measurement as the second argument.
* ```
* const date1 = dayjs('2019-01-25')
Expand All @@ -296,7 +298,7 @@ declare namespace dayjs {
*
* Docs: https://day.js.org/docs/en/display/difference
*/
diff(date: ConfigType, unit?: QUnitType | OpUnitType, float?: boolean): number
diff(date?: ConfigType, unit?: QUnitType | OpUnitType, float?: boolean): number
/**
* This returns the number of **milliseconds** since the Unix Epoch of the Day.js object.
* ```
Expand Down

0 comments on commit 6508494

Please sign in to comment.