Battling TypeScript Types
I have been struggling with this typescript issue for a bit now and not sure how to fix.
I have an object containing some data that I import. It looks like this.
The type for each item is automatically created, but I would rather it just be name: string and cost: Record<string, number>. How can I just simplify the types? My app works fine but I just cant get rid of this typescript error. Thanks!
I have an object containing some data that I import. It looks like this.
boom has a crazy long type considering each of the objects in the array. (where I think this is making things hard).The type for each item is automatically created, but I would rather it just be name: string and cost: Record<string, number>. How can I just simplify the types? My app works fine but I just cant get rid of this typescript error. Thanks!


