diff --git a/docs/bait.txt b/docs/bait.txt index 9f1e54b..fdc712f 100644 --- a/docs/bait.txt +++ b/docs/bait.txt @@ -2,5 +2,9 @@ catch(name, cb) > Catches a hook with `name`. Runs the `cb` when it is thrown catchOnce(name, cb) > Same as catch, but only runs the `cb` once and then removes the hook +release(name, catcher) > 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. + throw(name, ...args) > Throws a hook with `name` with the provided `args` diff --git a/emmyLuaDocs/bait.lua b/emmyLuaDocs/bait.lua index 01ca774..a5ecebd 100644 --- a/emmyLuaDocs/bait.lua +++ b/emmyLuaDocs/bait.lua @@ -12,6 +12,11 @@ function bait.catch(name, cb) end --- @param cb function function bait.catchOnce(name, cb) end +--- 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 + --- Throws a hook with `name` with the provided `args` --- @param name string --- @vararg any