dayjs.max('2021-01-01', dayjs('2020-01-01')) // => '2021-01-01'
dayjs.max('2020-01-01', dayjs('2021-01-01')) // => dayjs('2021-01-01')
dayjs.max(dayjs('2021-01-01'), '2020-01-01') // => TypeError: n[r].isValid is not a function
but in the minMax.d.ts :
declare module 'dayjs' {
export function max(dayjs: Dayjs[]): Dayjs
export function max(...dayjs: Dayjs[]): Dayjs
export function min(dayjs: Dayjs[]): Dayjs
export function min(...dayjs: Dayjs[]): Dayjs
}
dayjs.max('2021-01-01', dayjs('2020-01-01')) // => TypeError: '2021-01-01' is not a instance of Dayjs
dayjs.max('2020-01-01', dayjs('2021-01-01')) // => TypeError: '2021-01-01' is not a instance of Dayjs
dayjs.max(dayjs('2021-01-01'), '2020-01-01') // => TypeError '2020-01-01' is not a instance of Dayjs
Describe the bug
but in the minMax.d.ts :
Expected behavior
or
Information