We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Visual Studio Code Extension (sumneko.lua)
Linux
Annotations, Type Checking
Field declaration should have priority over generic types ---@Class gener: { [string]: number} ---@field field string
Expecting gener.field to have type string.
Field get type from generic declaration and field declaration
I understand that generics are not fully supported yet and there are a lot of issues. Feel free to close this issue if it is a duplicate.
No response
The text was updated successfully, but these errors were encountered:
You can use follow instead:
---@class gener ---@field field string ---@field [string] number
Sorry, something went wrong.
Yeah that works fine thank you. I think documentation don't mention it.
Also named field must be declared before generic field ([string]) but it is not a big deal.
No branches or pull requests
How are you using the lua-language-server?
Visual Studio Code Extension (sumneko.lua)
Which OS are you using?
Linux
What is the issue affecting?
Annotations, Type Checking
Expected Behaviour
Field declaration should have priority over generic types
---@Class gener: { [string]: number}
---@field field string
Expecting gener.field to have type string.
Actual Behaviour
Field get type from generic declaration and field declaration
Reproduction steps
Additional Notes
I understand that generics are not fully supported yet and there are a lot of issues. Feel free to close this issue if it is a duplicate.
Log File
No response
The text was updated successfully, but these errors were encountered: