I need to define a interface for a data which comes from the server where id
in a number, but all other properties are strings.
I tried:
interface AnyChartsData {
id: number;
[key: string]: string;
}
but i got this error:
[ts] Property 'id' of type 'number' is not assignable to string index type 'string'. [2411]
How can I define this interface properly?