You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Unable to use @enum or @alias type in table index (index signature) #2791
changed the title [-]Unable to use `@enum` type in table index (index signature)[/-][+]Unable to use `@enum` or `@alias` type in table index (index signature)[/+]on Aug 12, 2024
I want to create a table with specific indexes defined via aliases, but I can't. LLS can detect if you're trying to access a key that isn't defined:
Undefined field `not_find`
Fields cannot be injected into the reference of `table<NodeDefinition.GroupName, integer>` for `not_find`. To allow injection, add `[any]: any` to the definition
But it doesn't suggest existing keys when defining a table.
Activity
[-]Unable to use @enum type in table index[/-][+]Unable to use `@enum` type in table index (index signature)[/+]tmillr commentedon Aug 11, 2024
Surprisingly, it doesn't work with
@aliaseither -_-.I guess
@aliasdoesn't actually create an "alias".[-]Unable to use `@enum` type in table index (index signature)[/-][+]Unable to use `@enum` or `@alias` type in table index (index signature)[/+]tomlau10 commentedon Aug 12, 2024
Some similar issues:
wiredmatt commentedon Oct 5, 2024
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?
tmillr commentedon Oct 5, 2024
LSP. I don't use vscode.
varttist commentedon Aug 14, 2026
Damn, I don't like this problem either.
I want to create a table with specific indexes defined via aliases, but I can't. LLS can detect if you're trying to access a key that isn't defined:
But it doesn't suggest existing keys when defining a table.