I've recently began using TypeScript on my own projects, though I'm not sure how I should go about getting my code to work.
Object.entries(data[`set_${id}`].tiles).map(([tileType, tiles]) => (
tiles.map(([left, top]), index) => (
//rest of code
)
))
TypeScript is complaining that left, top, and index all have 'any' type. How can I go about assigning types in this configuration?
data.json Structure:
{
"set_1": {
"tiles": {
"typeA": [[0, 1], [0, 2]],
"typeB": [[2, 0], [2, 1]]
}
}
}
Any advice would be greatly appreciated.
Thanks!