How i use shortcuts with typescript?
My shortcuts:
configs={{
shortcuts: {
today: "Hoje",
yesterday: "Ontem",
past: (period) => `Últimos ${period} dias`,
currentMonth: "Este mês",
pastMonth: "Mês passado",
}
}}
Error:
Type '{ today: string; yesterday: string; past: (period: number) => string; currentMonth: string; pastMonth: string; }' is not assignable to type '{ today?: string | undefined; yesterday?: string | undefined; past?: ((period: number) => string) | undefined; currentMonth?: string | undefined; pastMonth?: string | undefined; } & { ...; }'.
Property 'today' is incompatible with index signature.
Type 'string' has no properties in common with type 'ShortcutsItem'.