lua-language-server
lua-language-server copied to clipboard
Unable to use `@enum` or `@alias` type in table index (index signature)
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.
Surprisingly, it doesn't work with @alias either -_-.
I guess @alias doesn't actually create an "alias".
Some similar issues:
- #2410
- #2610
- #2783
This used to work perfectly fine, what broke it? I remember using this december last year with no issue at all. Is it the LSP or VS Code?
Is it the LSP or VS Code?
LSP. I don't use vscode.