Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Koneki » How to document the return type of a module's __call metamethod ?
How to document the return type of a module's __call metamethod ? [message #1416540] Fri, 27 July 2012 05:42 Go to next message
Cheyi Lin is currently offline Cheyi LinFriend
Messages: 16
Registered: June 2012
Junior Member
Hi,

How do I document the return type of a module's __call metamethod ?


----
-- @module mymodule
local m = {}

----
-- @type mytype

----
-- mytype.number_field
-- @field [parent=#mytype] #number number_field

----
-- mytype.string_field
-- @field [parent=#mytype] #string string_field


local function mytype(t)
return {number_field=1, string_field="hello"}
end

setmetatable(m, {__call=mytype})

return m
Re: How to document the return type of a module's __call metamethod ? [message #1416547 is a reply to message #1416540] Fri, 27 July 2012 13:51 Go to previous message
Simon Bernard is currently offline Simon BernardFriend
Messages: 345
Registered: July 2009
Senior Member
Hi,
Currently there are no way to express the __call metamethod.
This is something, we should probably add.
Previous Topic:Code Assistance for external lib
Next Topic:Debug Variable Window, Tables wrong order
Goto Forum:
  


Current Time: Wed Apr 24 14:58:23 GMT 2024

Powered by FUDForum. Page generated in 0.03268 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top