Skip to content

Commit c359b89

Browse files
authored
fix(types): add varargs to hook callback annotations (#45)
1 parent 7fa6614 commit c359b89

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lua/resession/init.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -622,14 +622,14 @@ end
622622

623623
---Add a callback that runs at a specific time
624624
---@param name "pre_save"|"post_save"|"pre_load"|"post_load"
625-
---@param callback fun()
625+
---@param callback fun(...: any)
626626
M.add_hook = function(name, callback)
627627
table.insert(hooks[name], callback)
628628
end
629629

630630
---Remove a hook callback
631631
---@param name "pre_save"|"post_save"|"pre_load"|"post_load"
632-
---@param callback fun()
632+
---@param callback fun(...: any)
633633
M.remove_hook = function(name, callback)
634634
local cbs = hooks[name]
635635
for i, cb in ipairs(cbs) do

0 commit comments

Comments
 (0)