-
Notifications
You must be signed in to change notification settings - Fork 40
Closed
Description
I have a LOVE function annotated as so:
--- Draws a rectangle.
---@param mode DrawMode # How to draw the rectangle.
---@param x number # The position of top-left corner along the x-axis.
---@param y number # The position of top-left corner along the y-axis.
---@param width number # Width of the rectangle.
---@param height number # Height of the rectangle.
---@overload fun(mode:DrawMode, x:number, y:number, width:number, height:number, rx:number, ry:number?, segments:number?):void
function love.graphics.rectangle(mode, x, y, width, height) end
Which takes in 5 arguments by default.
I'm doing this: love.graphics.rectangle("line", self:getBoundingBox())
, where getBoundingBox()
returns 4 arguments. So this works in code.
And VSCode displays the proper 5-argument function:

However, there is also a warning:

where it talks about the 8-argument overload rather than the 5-argument one.
Metadata
Metadata
Assignees
Labels
No labels