We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Works here:
And it doesn't work here anymore:
---@enum animal Animal = { Cat = 1, Dog = 2, } ---@param x animal local function f(x) end f(Animal.Cat) -- suggests `Animal.Cat`, `Animal.Dog`, `1`, `2` as the first parameter ---@enum flags Flags = { FLAG_1 = 0x00000000, FLAG_2 = 0x00000001, FLAG_3 = 0x00000002, FLAG_4 = 0x00000004, FLAG_5 = 0x00000008, } ---@param flag flags local function SetCharmInfoFlags(flag) end SetCharmInfoFlags(Flags.FLAG_3);
The text was updated successfully, but these errors were encountered:
---@enum is binded to the table instead of variable, so the brackets cannot start another line.
---@enum
table
variable
This is to achieve:
local function getEnums() ---@enum X return { x = 1, y = 2, z = 3, } end
Sorry, something went wrong.
4529b31
I find a easy way to achieve the both case.
No branches or pull requests
Works here:
And it doesn't work here anymore:
The text was updated successfully, but these errors were encountered: