Skip to content

Commit

Permalink
Add annotations to create event with binded event
Browse files Browse the repository at this point in the history
  • Loading branch information
Insality committed Sep 21, 2024
1 parent 48186b7 commit 054d84d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions event/event.lua
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ end

---Create new event instance. If callback is passed, it will be subscribed to the event.
---@static
---@param callback function|nil The function to be called when the event is triggered.
---@param callback_context any|nil The first parameter to be passed to the callback function.
---@param callback function|event|nil The function to be called when the event is triggered. It will trigger the event if it is an event.
---@param callback_context any|nil The first parameter to be passed to the callback function. Not used if the callback is an event.
---@return event A new event instance.
---@nodiscard
function M.create(callback, callback_context)
Expand Down

0 comments on commit 054d84d

Please sign in to comment.