The DataSource typ in the options and in the setDataSource method is:
T[] | ((currentYear: number) => T[] | Promise<T[]>) | ((currentYear: number, done: (result: T[]) => void) => void)
But the fetch parameters are:
{ year: number, startDate: Date, endDate: Date }
So there should be an interface DateSourceFetchParameters and the DataSource type should be:
T[] | ((params: DateSourceFetchParameters) => T[] | Promise<T[]>) | ((params: DateSourceFetchParameters, done: (result: T[]) => void) => void)
The DataSource typ in the options and in the setDataSource method is:
T[] | ((currentYear: number) => T[] | Promise<T[]>) | ((currentYear: number, done: (result: T[]) => void) => void)
But the fetch parameters are:{ year: number, startDate: Date, endDate: Date }
So there should be an interface
DateSourceFetchParameters
and the DataSource type should be:T[] | ((params: DateSourceFetchParameters) => T[] | Promise<T[]>) | ((params: DateSourceFetchParameters, done: (result: T[]) => void) => void)