-
What do you want to achieve?
I want to create a structure for my dictionary via a custom type. -
What is the issue?
The issue is that I can not include a selection of names for the index with multiple strings. However it works, when I only use one string.
Info: I am using the type solver beta & strict typing.
type _Container = {
[number]: {
[("Test1" | "Test2")]: { -- For some reason, this breaks the type checking
["Stats"]: {
Speed: number
},
["Properties"]: {
Color: string
}
}
}
}
local Container: _Container = {
[4859] = {
["Test1"] = {
["Stats"] = {
Speed = 10
},
["Properties"] = {
Color = "Yellow"
}
}
}
}