luau
luau copied to clipboard
Free type pack is escaping its module with LemonSignal library
No clue what this means but it told me to report it here.
Relevant code:
--!strict
local Class = {}
Class.__index = Class
-->> Includes
local Signal = require(script.Parent.Signal) -- https://github.com/Data-Oriented-House/LemonSignal
-->> Types
export type Class = typeof(setmetatable({} :: ClassStruct, Class))
type ClassStruct = {
signal: Signal.Signal<number>,
}
-->> Public
function Class.new(interval: number): Class
local self = setmetatable({
signal = Signal.new()
}, Class)
return self
end
-- ENTIRE function body has the error, including comments (not including header or 'end')
-- TypeError: Free type pack is escaping its module, please report this error
function Class.Connect(self: Class, callback: (number) -> ())
return self.signal:Connect(callback)
end
-->>
return Class
Thank you for the report! I added that warning, thank you for the detailed reproduction steps.