diff --git a/api/js/etemplate/Et2Date/Holidays.ts b/api/js/etemplate/Et2Date/Holidays.ts index 935ef4da83..202c269725 100644 --- a/api/js/etemplate/Et2Date/Holidays.ts +++ b/api/js/etemplate/Et2Date/Holidays.ts @@ -8,15 +8,15 @@ let _holiday_cache = {}; * Get a list of holidays for the given year * * Returns either a list of holidays indexed by date, in Ymd format: - * {20001225: {day: 14, month: 2, occurence: 2021, name: "Valentinstag"}} + * {20001225: [{day: 14, month: 2, occurence: 2021, name: "Valentinstag"}]} * or a promise that resolves with the list. * * No need to cache the results, we do it here. * * @param year - * @returns Promise | Object + * @returns Promise<{[key: string]: Array}>|{[key: string]: Array} */ -export function holidays(year) : Promise | {} +export function holidays(year) : Promise<{ [key : string] : Array }> | { [key : string] : Array } { // No country selected causes error, so skip if it's missing if(!egw.preference('country', 'common'))