How to type this so Sumneko is happy #1616
|
I have the below code and it warns me that the last line has the below error:
Code: I've tried adding In my real code the value of |
Answered by
carsakiller
Oct 7, 2022
Replies: 1 comment 2 replies
|
If you are going to be assigning random key names that can not be foreseen (and therefor documented with ---@type table<string, any>
local x = {
name = "me",
nickName = "M"
}
local fieldName = "name"
x[fieldName] = nil |
2 replies
Answer selected by
muppet9010
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you are going to be assigning random key names that can not be foreseen (and therefor documented with
@field), you will have to do the following: