@@ -37,6 +37,19 @@ function debug.getfenv(o) end
3737--- @return thread
3838function debug .gethook (thread ) end
3939
40+ --- @class DebugInfo
41+ --- @field linedefined number
42+ --- @field lastlinedefined number
43+ --- @field currentline number
44+ --- @field func function
45+ --- @field isvararg boolean
46+ --- @field namewhat string
47+ --- @field source string
48+ --- @field nups number
49+ --- @field what string
50+ --- @field nparams number
51+ --- @field short_src string
52+
4053---
4154--- Returns a table with information about a function. You can give the
4255--- function directly, or you can give a number as the value of `f`,
@@ -57,11 +70,11 @@ function debug.gethook(thread) end
5770--- with a name for the current function, if a reasonable name can be found,
5871--- and the expression `debug.getinfo(print)` returns a table with all available
5972--- information about the `print` function.
60- --- @overload fun ( f : table ): table
73+ --- @overload fun ( f : function ): DebugInfo
6174--- @param thread thread
62- --- @param f table
75+ --- @param f function
6376--- @param what string
64- --- @return table
77+ --- @return DebugInfo
6578function debug .getinfo (thread , f , what ) end
6679
6780---
@@ -124,7 +137,7 @@ function debug.getupvalue(f, up) end
124137--- call `getinfo` with level 2 to get more information about the running
125138--- function (level 0 is the `getinfo` function, and level 1 is the hook
126139--- function)
127- --- @overload fun ( hook : fun (): any , mask : any )
140+ --- @overload fun ( hook :( fun (): any ) , mask : any ): void
128141--- @param thread thread
129142--- @param hook fun (): any
130143--- @param mask string
0 commit comments