Let’s say I want to create a new type called “Human” that is a dictionary with the following properties:
local Human = {Health = number, Height = number, Name = string, etc.)
How can I convert it to a type so I can do the following:
function setHumanHealth(human: Human, health: number)
--Health should auto-complete
human.Health = health
--this should redline:
human.Test = "Hello world!"
end
Currently, I’m limited to defining those as {[string]: any}
but that isn’t efficient and doesn’t have the intended behavior, it just limits the input to dictionaries in general(else it redlines).