Hilbish/emmyLuaDocs/bait.lua

29 lines
756 B
Lua
Raw Normal View History

2022-02-25 22:00:39 +00:00
--- @meta
local bait = {}
--- Catches a hook with `name`. Runs the `cb` when it is thrown
2022-02-25 22:15:49 +00:00
--- @param name string
--- @param cb function
function bait.catch(name, cb) end
2022-02-25 22:00:39 +00:00
--- Same as catch, but only runs the `cb` once and then removes the hook
2022-02-25 22:15:49 +00:00
--- @param name string
--- @param cb function
function bait.catchOnce(name, cb) end
2022-02-25 22:00:39 +00:00
2022-10-11 21:43:22 +00:00
--- Returns a table with hooks on the event with `name`.
function bait.hooks() end
2022-08-17 22:01:55 +00:00
--- Removes the `catcher` for the event with `name`
--- For this to work, `catcher` has to be the same function used to catch
--- an event, like one saved to a variable.
function bait.release() end
2022-02-25 22:00:39 +00:00
--- Throws a hook with `name` with the provided `args`
2022-02-25 22:15:49 +00:00
--- @param name string
--- @vararg any
2022-04-05 01:35:10 +00:00
function bait.throw(name, ...) end
2022-02-25 22:00:39 +00:00
return bait