Skip to content

Commit

Permalink
Convert intlFormatDistance to v3
Browse files Browse the repository at this point in the history
  • Loading branch information
leshakoss committed Oct 19, 2022
1 parent 82eca80 commit fadbd4e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/intlFormatDistance/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,9 @@ export interface IntlFormatDistanceOptions {
* )
* //=> 'in 2 yr'
*/
export default function intlFormatDistance(
date: Date | number,
baseDate: Date | number,
export default function intlFormatDistance<DateType extends Date>(
date: DateType | number,
baseDate: DateType | number,
options?: IntlFormatDistanceOptions
): string {
let value: number = 0
Expand Down

0 comments on commit fadbd4e

Please sign in to comment.