chore(callbacks): update annotations

This commit is contained in:
Linden committed 2021-11-11 07:56:15 +11:00
1 parent ab4807fee0
commit 9a60f3bd1d
3 files changed
+10 -6

No files matched your search

+2 -2
View File
@@ -12,9 +12,9 @@ end
local ServerCallback = table.create(0, 2)
--- Sends an event to the server and halts the current thread until a response is returned.
---@param event string
---@param delay number
--- Sends an event to the server and halts the current thread until a response is returned.
ServerCallback.Await = function(resource, event, delay, ...)
CallbackTimer(event, delay)
event = ('__cb_%s:%s'):format(resource, event)
@@ -27,9 +27,9 @@ ServerCallback.Await = function(resource, event, delay, ...)
return table.unpack(Citizen.Await(promise))
end
--- Sends an event to the server and triggers a callback function once the response is returned.
---@param event string
---@param delay number
--- Sends an event to the server and triggers a callback function once the response is returned.
ServerCallback.Async = function(resource, event, delay, cb, ...)
CallbackTimer(event, delay)
event = ('__cb_%s:%s'):format(resource, event)