Updated meta files#12
Conversation
carsakiller
left a comment
There was a problem hiding this comment.
Hello! Thank you for taking the time to contribute.
There are quite a few places where a more specific/informational type like string[] or love.RecordingDevices[] was replaced with just table, or similar. It would be best to keep the specific types as they are much more useful.
There were also a few changes that seem to disagree with the official documentation, but other than those, it is mainly small tweaks and typos.
| ---[Open in Browser](https://love2d.org/wiki/love.audio.getActiveEffects) | ||
| --- | ||
| ---@return string[] effects # The list of the names of the currently enabled effects. | ||
| ---@return table effects # The list of the names of the currently enabled effects. |
There was a problem hiding this comment.
Is the table returned not a string[]? The official documentation doesn't seem to offer any insight into the table's contents, but it seems from the description that it would be an "array" of strings.
| ---@return number fx # Forward vector of the listener orientation. | ||
| ---@return number fy # Forward vector of the listener orientation. | ||
| ---@return number fz # Forward vector of the listener orientation. | ||
| ---@return number ux # Up vector of the listener orientation. | ||
| ---@return number uy # Up vector of the listener orientation. | ||
| ---@return number uz # Up vector of the listener orientation. |
There was a problem hiding this comment.
Both the current and incoming documentation contain useful information.
I think they should be combined.
| ---@return number fx # Forward vector of the listener orientation. | |
| ---@return number fy # Forward vector of the listener orientation. | |
| ---@return number fz # Forward vector of the listener orientation. | |
| ---@return number ux # Up vector of the listener orientation. | |
| ---@return number uy # Up vector of the listener orientation. | |
| ---@return number uz # Up vector of the listener orientation. | |
| ---@return number fx # Forward vector x component of the listener orientation. | |
| ---@return number fy # Forward vector y component of the listener orientation. | |
| ---@return number fz # Forward vector z component of the listener orientation. | |
| ---@return number ux # Up vector x component of the listener orientation. | |
| ---@return number uy # Up vector y component of the listener orientation. | |
| ---@return number uz # Up vector z component of the listener orientation. |
| ---[Open in Browser](https://love2d.org/wiki/love.audio.getRecordingDevices) | ||
| --- | ||
| ---@return love.RecordingDevice[] devices # The list of connected recording devices. | ||
| ---@return table devices # The list of connected recording devices. |
There was a problem hiding this comment.
This is overwriting the love.RecordingDevice[] type with a less descriptive and helpful table type, effectively losing a bunch of helpful type information.
| ---@overload fun(source: love.Source, ...) | ||
| ---@overload fun(sources: table) | ||
| ---@return love.Source[] Sources # A table containing a list of Sources that were paused by this call. | ||
| ---@return table Sources # A table containing a list of Sources that were paused by this call. |
There was a problem hiding this comment.
| ---@overload fun(coloredtext: table, transform: love.Transform) | ||
| ---@overload fun(text: string, font: love.Font, transform: love.Transform) | ||
| ---@overload fun(text: number, transform: love.Transform) | ||
| ---@overload fun(test: number, font: love.Font, transform: love.Transform) |
There was a problem hiding this comment.
Little typo
| ---@overload fun(test: number, font: love.Font, transform: love.Transform) | |
| ---@overload fun(text: number, font: love.Font, transform: love.Transform) |
| ---@param quad2 love.Quad # The second Quad to use. | ||
| function ParticleSystem:setQuads(quad1, quad2) end |
There was a problem hiding this comment.
Seems to require at least 2 args, but can be given more: https://www.love2d.org/wiki/ParticleSystem:setQuads
| ---@param quad2 love.Quad # The second Quad to use. | |
| function ParticleSystem:setQuads(quad1, quad2) end | |
| ---@param quad2 love.Quad # The second Quad to use. | |
| ---@param ... love.Quad # Additional Quads | |
| function ParticleSystem:setQuads(quad1, quad2, ...) end |
| ---@param sw number # The reference width, the width of the Image. (Must be greater than 0.) | ||
| ---@param sh number # The reference height, the height of the Image. (Must be greater than 0.) |
There was a problem hiding this comment.
According to the official documentation, the previous documentation seems correct, with sw and sh being optional.
| --- | ||
| ---@overload fun(x1: number, y1: number, x2: number, y2: number, ...):boolean | ||
| ---@param vertices number[] # The vertices of the polygon as a table in the form of {x1, y1, x2, y2, x3, y3, ...}. | ||
| ---@overload fun(x1: number, y1: number, x2: number, y2: number, x3: number, y3: number):boolean |
There was a problem hiding this comment.
Many more args are possible.
| ---@overload fun(x1: number, y1: number, x2: number, y2: number, x3: number, y3: number):boolean | |
| ---@overload fun(x1: number, y1: number, x2: number, y2: number, x3: number, y3: number, ...: number):boolean |
| --- | ||
| ---@overload fun(x1: number, y1: number, x2: number, y2: number, ...):love.BezierCurve | ||
| ---@param vertices number[] # The vertices of the control polygon as a table in the form of {x1, y1, x2, y2, x3, y3, ...}. | ||
| ---@overload fun(x1: number, y1: number, x2: number, y2: number, x3: number, y3: number):love.BezierCurve |
There was a problem hiding this comment.
| ---@overload fun(x1: number, y1: number, x2: number, y2: number, x3: number, y3: number):love.BezierCurve | |
| ---@overload fun(x1: number, y1: number, x2: number, y2: number, x3: number, y3: number, ...: number):love.BezierCurve |
| ---@param arg1 any # Additional arguments that the given function will receive when it is called. | ||
| ---@vararg any # Additional arguments that the given function will receive when it is called. | ||
| ---@return any ret1 # The first return value of the given function (if any.) | ||
| function Channel:performAtomic(func, ...) end | ||
| function Channel:performAtomic(func, arg1, ...) end |
There was a problem hiding this comment.
The additional arguments are both numerous and optional so it would probably be best to do the following:
| ---@param arg1 any # Additional arguments that the given function will receive when it is called. | |
| ---@vararg any # Additional arguments that the given function will receive when it is called. | |
| ---@return any ret1 # The first return value of the given function (if any.) | |
| function Channel:performAtomic(func, ...) end | |
| function Channel:performAtomic(func, arg1, ...) end | |
| ---@param ... any # Additional arguments that the given function will | |
| ---@return any ret1 # The first return value of the given function (if any.) | |
| function Channel:performAtomic(func, ...) end |
|
hmm sorry I didn't know I have to update the things by hand. I just ran |
I don't think it needs much explaination. It was outdated :)