Well I have an object which behaves like a dictionary - except for having a few static fields (that are of different type).
ID:
{
id: number,
key: string,
en_gb: string,
de_de: string,
//...any more locale
}
So I tried to use a combination of both a dictionary as well as static object:
{
id: number,
key: string,
[locale: string]: string
}
However now I get that property of type "number" is not assignable to string index type "string".
How would I handle such an object in typescript, what is the proper typing when I am given data in this format?