Hello. I am trying to create a type modulescript with all of my oop types simply so I can have a global list of types instead of scattered everywhere.
First I tried this
and don’t get me wrong, it works, but I have to physically define every single type myself!
Ofc the roblox type wizard engineers thought of this, so you can type define with typeof to take all the methods off of you like so
ok so we can define types in all of our oop objects, can’t we just require them all and yoink them all in a type script?
well actually, yes we can
and ill just try and use OopObject2 in OopClass1’s modulescript aaaand…
uh oh! (understandably) roblox doesn’t allow cyclic module requires!
heres where my frustrations come in
in this video I show that you CAN have cyclic types, as long as they are all in the same script.
the implications for something like this existing for modulescripts is insane, it would make my life infinite times easier, it would things like intellisensed children types and component based objects easier by an INSANE amount.
is there any way you lovely devforum scripting support browsers can think of to get around this issue?
edit: if not can a regular on the devforum make a feature request for a method to extract only the exported types from a modulescript and not require the whole modulescript at runtime?
edit2: fixing a goof my cat made when he stepped on my keyboard