You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
---@classGuidlocalGuid---@classDataContainerlocalDataContainer= {}
---`SERVER/CLIENT`---Creates a shallow clone of this instance, which is essentially the equivalent of creating a new instance of the same type and assigning the values of this instance to all of its properties. Any properties that contain structure types (eg. Vec3) will be cloned when assigning, while properties that contain instance types (eg. DataContainer) will be referencing the same instance.---@returnDataContainer @ The newly created instance.functionDataContainer:Clone() end---`SERVER/CLIENT`---Creates a shallow clone of this instance and assigns it the provided Guid, which is essentially the equivalent of creating a new instance of the same type with the provided Guid and assigning the values of this instance to all of its properties. Any properties that contain structure types (eg. Vec3) will be cloned when assigning, while properties that contain instance types (eg. DataContainer) will be referencing the same instance.---@paramguidGuid @ The Guid to assign to the cloned instance.---@returnDataContainer @ The newly created instance.functionDataContainer:Clone(guid) end---@typeDataContainerlocals---@typeGuidlocalts:Clone(t)
It's correct to show that this is a duplicate function. But it should not ignore the second one. Instead it should act like an overload.
The text was updated successfully, but these errors were encountered:
You should just use the EmmyLua (or LuaDoc?) ---@overload syntax as far as documentation. It doesn't make much sense to define a function twice and expect the language server to treat it as overloads as far as normal Lua, however.
i.e:
---@overloadfun(x: number, y: number):string---@overloadfun(x: number):number---@returnbooleanlocalfunctionf() end
The other problem with the @overload tag is it does not allow you to provide a description for the function or its parameters. I often write my documentation in this same way where there are two functions with differing annotations - which results in some weirdness with the intellisense.
We have this inside a library:
It's correct to show that this is a duplicate function. But it should not ignore the second one. Instead it should act like an overload.
The text was updated successfully, but these errors were encountered: