I have a generic which its default type is a `string`:

```
interface EntityState<typeOfID = string> {
  entities: { [ id: typeOfID]: any };
}

```

I get the error:

```
An index signature parameter type must be either 'string' or 'number'.(1023)

```

I also tried the following:

```
interface EntityState<typeOfID extends string | number> {
  entities: { [ id: typeOfID]: any };
}

```

And it doesn't work. How to solve it?