Record with number as key?

const A = type("Record<number, string>");

This throws error:
Argument of type '"Record<number, string>"' is not assignable to parameter of type '"K must be assignable to string | symbol (was number) "'

But it should be valid:
type A = Record<number, string>;
Was this page helpful?