Upgrades is defined as an array of dictionaries. In your example, you are accidentally using it as just a dictionary itself, which is possibly the reason for you not getting auto-complete. The following should ideally get you autocomplete:
type Upgrade = {
Price: number,
}
type Item = {
Upgrades: {Upgrade}
}
type ThingDatabase = {
Items: {Item}
}
local Database: ThingDatabase = {}
Database.Items = {
{
Upgrades = {
{
Pr
} -- Each upgrade needs to be its own dictionary, even if we only have one
}
}
}
Alternatively, if you want to support Upgrades being a dictionary itself when you only have one upgrade. From a typechecking perspective, you could define the Item type as: