In one modulescript I have a custom Luau type defined (among other things:)
local moduleA = {}
type AppartmentIventoryItem = {
DateAquired : number;
UserAcknowledged : boolean;
Catagory : string;
ItemId : string;
Count : number;
CustomAttributes : {};
}
...
return moduleA
In another module I would like to be able to define a variable that will hold this custom type
local moduleB = {}
local Variable : AppartmentIventoryItem?
return moduleB
Is there a way to reference this type defined in ModuleA from ModuleB? I’m having an issue where Roblox isn’t able to figure it out on it’s own and I would like to tell it what type this variable holds but can’t. Do I have to copy and paste the definition of this type into every script that uses it? I really don’t want to do that as making a single change will require me to make that change in many places.