I have an object that looks like this
{
"sdfsdkhdfs": 1,
"jjgtusdf": 2
}
where the keys are randomly generated, and there's an unspecified number of them. I want to create a type for this object in Typescript. How should I do this?
interface MyObject { [key: string]: number };
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With