I want to write new declaration for some functions, for example, to add generics or some complex types (@nodiscard or even integer) that the wiki does not allow us to use.
However, if I do this in a "custom directory", then I completely replace the function description and eventually it becomes obsolete.
I would prefer to be able to write a "diff" when I can change the parameter types, but not change the parameter name/desc with a full method info.
--[[... unchanged info ...]]
---@generic T
---@param metaName `T` --[[... unchanged desc ...]]
---@return T? --[[... unchanged desc ...]]
---@nodiscard
function _G.FindMetaTable(metaName) end
Do you have any ideas on how to do this? I don't mean the real diff that is used in version control systems - maybe it's too complicated.
p.s. But yes, I don't want to write a @nodiscard to everything, it's stupid.
I want to write new declaration for some functions, for example, to add generics or some complex types (
@nodiscardor eveninteger) that the wiki does not allow us to use.However, if I do this in a "custom directory", then I completely replace the function description and eventually it becomes obsolete.
I would prefer to be able to write a "diff" when I can change the parameter types, but not change the parameter name/desc with a full method info.
Do you have any ideas on how to do this? I don't mean the real
diffthat is used in version control systems - maybe it's too complicated.p.s. But yes, I don't want to write a
@nodiscardto everything, it's stupid.