-
-
Notifications
You must be signed in to change notification settings - Fork 382
Closed
Labels
duplicateThis issue or pull request already existsThis issue or pull request already existsenhancementNew feature or requestNew feature or requestfeat/LuaCats AnnotationsRelated to Lua Language Server Annotations (LuaCats)Related to Lua Language Server Annotations (LuaCats)
Description
It would be awesome if we included some type of EmmyLua documentation extension to support metamethods (particularly the Mathematic Operators).
I'd like to be able to code something like this:
---@class MyClass
---@metamethod add fun:(self: MyClass, other: MyClass) : MyClass
---@metamethod subtract fun:(self: MyClass, other: MyClass) : MyClass
local x = {}
---@type MyClass
local a
---@type MyClass
local b
--- Ideally, `c` would be inferred to be MyClass off of the annotations
local c = a + b
Frityet, 4513ECHO, firas-assaad, sewbacca, carsakiller and 1 more
Metadata
Metadata
Assignees
Labels
duplicateThis issue or pull request already existsThis issue or pull request already existsenhancementNew feature or requestNew feature or requestfeat/LuaCats AnnotationsRelated to Lua Language Server Annotations (LuaCats)Related to Lua Language Server Annotations (LuaCats)