Hilbish/emmyLuaDocs/bait.lua

29 lines
751 B
Lua
Raw Permalink Normal View History

2022-02-25 22:00:39 +00:00
--- @meta
local bait = {}
--- Catches an event. This function can be used to act on events.
---
---
2022-02-25 22:15:49 +00:00
function bait.catch(name, cb) end
2022-02-25 22:00:39 +00:00
--- Catches an event, but only once. This will remove the hook immediately after it runs for the first time.
2022-02-25 22:15:49 +00:00
function bait.catchOnce(name, cb) end
2022-02-25 22:00:39 +00:00
--- Returns a table of functions that are hooked on an event with the corresponding `name`.
2022-12-02 00:05:24 +00:00
function bait.hooks(name) end
2022-10-11 21:43:22 +00:00
2023-02-07 22:19:24 +00:00
--- Removes the `catcher` for the event with `name`.
2022-08-17 22:01:55 +00:00
--- For this to work, `catcher` has to be the same function used to catch
--- an event, like one saved to a variable.
---
---
2022-12-02 00:05:24 +00:00
function bait.release(name, catcher) end
2022-08-17 22:01:55 +00:00
--- Throws a hook with `name` with the provided `args`.
---
---
function bait.throw(name, ...args) end
2022-02-25 22:00:39 +00:00
return bait