The top, left and relative element tables are keyed by the define, but
the duplicate registration assert looked up `define.name`, so it never
fired.
GuiIter.remove_element indexed `registered_scopes` by player index
instead of the scope elements it had just fetched, so it removed
nothing.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
emmylua only parses the inline cast as `--[[@as T]]`, the spaced form
`--[[ @as T ]]` is treated as a plain comment, so all 149 of them were
doing nothing.
LuaGuiElement.style is a union because a style name can be assigned to
it, so reading it back needs the cast.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Async ids come from `get_function_name`, which returns a string, but
were documented as numbers.
`setmetatable` in clusterio's compat module loses `LibCompat` on the
module return, so the require is cast.
`GuiData.__index` accepts a `DataKey` but emmylua needs that as an
index signature on the class.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>