Skip to content

Commit 6d96909

Browse files
committed
fix template docs
1 parent 7d57597 commit 6d96909

File tree

5 files changed

+20
-20
lines changed

5 files changed

+20
-20
lines changed

meta/template/basic.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ _G = {}
5656

5757
---@version 5.1
5858
---#DES 'getfenv'
59-
---@param f? integer|async fun()
59+
---@param f? integer|async fun(...):...
6060
---@return table
6161
---@nodiscard
6262
function getfenv(f) end
@@ -204,7 +204,7 @@ function select(index, ...) end
204204

205205
---@version 5.1
206206
---#DES 'setfenv'
207-
---@param f async fun()|integer
207+
---@param f async fun(...):...|integer
208208
---@param table table
209209
---@return function
210210
function setfenv(f, table) end

meta/template/coroutine.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
coroutine = {}
66

77
---#DES 'coroutine.create'
8-
---@param f async fun()
8+
---@param f async fun(...):...
99
---@return thread
1010
---@nodiscard
1111
function coroutine.create(f) end
@@ -54,7 +54,7 @@ function coroutine.running() end
5454
function coroutine.status(co) end
5555

5656
---#DES 'coroutine.wrap'
57-
---@param f async fun()
57+
---@param f async fun(...):...
5858
---@return fun(...):...
5959
---@nodiscard
6060
function coroutine.wrap(f) end

meta/template/debug.lua

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ function debug.gethook(co) end
6363
---#DES 'debug.getinfo'
6464
---@overload fun(f: integer|function, what?: infowhat):debuginfo
6565
---@param thread thread
66-
---@param f integer|async fun()
66+
---@param f integer|async fun(...):...
6767
---@param what? infowhat
6868
---@return debuginfo
6969
---@nodiscard
@@ -81,9 +81,9 @@ function debug.getinfo(thread, f, what) end
8181
function debug.getlocal(thread, level, index) end
8282
---#else
8383
---#DES 'debug.getlocal>5.2'
84-
---@overload fun(f: integer|async fun(), index: integer):string, any
84+
---@overload fun(f: integer|async fun(...):..., index: integer):string, any
8585
---@param thread thread
86-
---@param f integer|async fun()
86+
---@param f integer|async fun(...):...
8787
---@param index integer
8888
---@return string name
8989
---@return any value
@@ -103,7 +103,7 @@ function debug.getmetatable(object) end
103103
function debug.getregistry() end
104104

105105
---#DES 'debug.getupvalue'
106-
---@param f async fun()
106+
---@param f async fun(...):...
107107
---@param up integer
108108
---@return string name
109109
---@return any value
@@ -146,11 +146,11 @@ function debug.setfenv(object, env) end
146146
---|+'"l"' # ---#DESTAIL 'hookmask.l'
147147

148148
---#DES 'debug.sethook'
149-
---@overload fun(hook: async fun(), mask: hookmask, count?: integer)
150-
---@overload fun(thread: thread)
151-
---@overload fun()
149+
---@overload fun(hook: (async fun(...):...), mask: hookmask, count?: integer)
150+
---@overload fun(thread: thread):...
151+
---@overload fun(...):...
152152
---@param thread thread
153-
---@param hook async fun()
153+
---@param hook async fun(...):...
154154
---@param mask hookmask
155155
---@param count? integer
156156
function debug.sethook(thread, hook, mask, count) end
@@ -172,7 +172,7 @@ function debug.setlocal(thread, level, index, value) end
172172
function debug.setmetatable(value, meta) end
173173

174174
---#DES 'debug.setupvalue'
175-
---@param f async fun()
175+
---@param f async fun(...):...
176176
---@param up integer
177177
---@param value any
178178
---@return string name
@@ -204,17 +204,17 @@ function debug.traceback(thread, message, level) end
204204

205205
---@version >5.2, JIT
206206
---#DES 'debug.upvalueid'
207-
---@param f async fun()
207+
---@param f async fun(...):...
208208
---@param n integer
209209
---@return lightuserdata id
210210
---@nodiscard
211211
function debug.upvalueid(f, n) end
212212

213213
---@version >5.2, JIT
214214
---#DES 'debug.upvaluejoin'
215-
---@param f1 async fun()
215+
---@param f1 async fun(...):...
216216
---@param n1 integer
217-
---@param f2 async fun()
217+
---@param f2 async fun(...):...
218218
---@param n2 integer
219219
function debug.upvaluejoin(f1, n1, f2, n2) end
220220

meta/template/jit.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,17 @@
99
---@field arch string
1010
jit = {}
1111

12-
---@overload fun()
12+
---@overload fun(...):...
1313
---@param func function|boolean
1414
---@param recursive? boolean
1515
function jit.on(func, recursive) end
1616

17-
---@overload fun()
17+
---@overload fun(...):...
1818
---@param func function|boolean
1919
---@param recursive? boolean
2020
function jit.off(func, recursive) end
2121

22-
---@overload fun()
22+
---@overload fun(...):...
2323
---@overload fun(tr: number)
2424
---@param func function|boolean
2525
---@param recursive? boolean

meta/template/string.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ function string.byte(s, i, j) end
2020
function string.char(byte, ...) end
2121

2222
---#DES 'string.dump'
23-
---@param f async fun()
23+
---@param f async fun(...):...
2424
---@param strip? boolean
2525
---@return string
2626
---@nodiscard

0 commit comments

Comments
 (0)