Question: Dynamic property access?
Im writing a similar system to useEvent, came across the error myself, then came over here to see how you guys did it, but youre doing the same thing.
https://github.com/matter-ecs/matter/blob/f31981ba5dbc481f637c08e9fa3765419d566501/lib/hooks/useEvent.luau#L13C3-L13C30
TypeError: Attempting a dynamic property access on type 'Instance' is unsafe and may cause exceptions at runtimeLuau[1036](https://luau-lang.org/typecheck)
So is this error just old? Can you dynamically access properties safely now? The file in which you guys do this isnt typechecked so maybe it just flew under the radar? Either way im not sure if theres any alternative for what we're trying to do.
There isn't another way to do that without a type error. This is a limitation of Luau which doesn't provide a type safe way to do that. Generally there are many things in matter that aren't type safe because it does things that aren't expressible safely in Luau's type system.