I am writing the following in typescript and see the following error
const WEEKDAYS_SHORT = {
en: ['S', 'M', 'T', 'W', 'T', 'F', 'S'],
de: ['S', 'M', 'D', 'M', 'D', 'F', 'S'],
};
<StyledDayPicker weekdaysShort={WEEKDAYS_SHORT[language]} />
Type 'string[]' is not assignable to type '[string, string, string, string, string, string, string]'. Property '0' is missing in type 'string[]'. [2322]
I have tried the following which is giving me an error.
const WEEKDAYS_SHORT: string[] = {
en: ['S', 'M', 'T', 'W', 'T', 'F', 'S'],
de: ['S', 'M', 'D', 'M', 'D', 'F', 'S'],
};