lua-language-server icon indicating copy to clipboard operation
lua-language-server copied to clipboard

Unable to use `@enum` or `@alias` type in table index (index signature)

Open tmillr opened this issue 1 year ago • 4 comments

I don't know if this is intended or not, but IIRC this is possible in typescript.

---@enum idx
local enum = { a = 'a', b = 'b' }

---@param tbl table<idx, string>
local function x(tbl) end

When calling x with a table (e.g. x({ | })), I expect to receive completion for a and b, but I don't get that.

tmillr avatar Aug 11 '24 12:08 tmillr