Open
Description
---@enum Test
local Test = {
Test1 = 1,
Test2 = 2,
Test3 = 2,
}
---@type Test|Test[]
local a
---@param c Test
local function b(c) end
if type(a) == "table" then
b(a[1]);
else
b(a);
end
---@class Class
---@field a Test|Test[]
local Class = {};
function Class:Test()
if type(self.a) == "table" then
b(self.a[1]);
else
b(self.a);
end
end