I have this piece of code:
for _: number, property: string in ipairs(CLASS_PROPERTY_MAP[class]) do
local value: any = instance[property]
instance[property]
will fail, telling me that a table was expected and it got an Instance instead. Instance in this case is typechecked to Instance. Do I have to do something stupid like union types or generics or is there a proper solution I’ve missed?
Been searching but I don’t really like the suggestions (aforementioned union typing).