Skip to content

Commit

Permalink
fix(ts): use stricter type for getDateDiff unit param
Browse files Browse the repository at this point in the history
  • Loading branch information
IlCallo committed Dec 31, 2021
1 parent d7bf46d commit 766cc76
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ui/types/utils/date.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ export namespace date {
function endOfDate(date: Date | number | string, option: DateUnitOptions, utc?: boolean): Date;
function getMaxDate(date: Date | number | string, ...args: (Date | number | string)[]): Date;
function getMinDate(date: Date | number | string, ...args: (Date | number | string)[]): Date;
function getDateDiff(date: Date | number | string, subtract: Date | number | string, unit?: string): number;
// TODO: (Qv3) uniform "unit" to `DateUnitOptions` interface
function getDateDiff(date: Date | number | string, subtract: Date | number | string, unit?: `${DateUnitOptions}s`): number;
function getDayOfYear(date: Date | number | string): number;
function inferDateFormat(date: Date | number | string): "date" | "number" | "string";
function getDateBetween(date: Date | number | string, min?: Date | number | string, max?: Date | number | string): Date;
Expand Down

0 comments on commit 766cc76

Please sign in to comment.