I have a Queue module that is created with a simple:
function Queue:New()
local o = {}
setmetatable(o, self)
self.__index = self
o.Queue = {}
return o
end
I have another module for popups that wants to use this queue:
--!strict
local QueueClass = require(*//QueueClass path//*)
local module = {}
module.__index = module
function module:StartPopupManager()
self.queue = QueueClass:New()
...
end
Issue is that I get this warning:
Table type 'Queue' not compatible with type 't1 where t1 = {+ __index: t1 +}'
because the former is missing field '__index'
When I try to require and initiate QueueClass in a regular script it does not give out this warning.
Would appreciate help with this as I don’t understand the issue.