-
-
Notifications
You must be signed in to change notification settings - Fork 407
Open
Description
How are you using the lua-language-server?
Visual Studio Code Extension (sumneko.lua)
Which OS are you using?
Windows
What is the issue affecting?
Type Checking
Expected Behaviour
we have a (generated) class like
---@class GlobalModSettings
---@field ["heat-visualizer-updates-per-surface-per-tick"] ModSetting<int32>
---@field ["nixie-tube-update-speed-alpha"] ModSetting<int32>
---@field ["nixie-tube-update-speed-numeric"] ModSetting<int32>
---@field [string] ModSetting<(int32)|(double)|(boolean)|(string)|(Color)>
which has narrower types for the known entries and a general type for the "everything else" field, but when i then use this type like
local x = settings.global["heat-visualizer-updates-per-surface-per-tick"]
x is given the type from the [string] field, rather than the one that is an exact match for that specific string
Actual Behaviour
(this template is always off screen and i've written the whole thing in the first box...)
Reproduction steps
(this template is always off screen and i've written the whole thing in the first box...)
Additional Notes
No response
Log File
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels