
---@class coxpcall*
---@type coxpcall*
local M = {}

--- coroutine-safe xpcall。
---@param fn function The called function.
---@param err function Error handling function.
---@param ... any parameter.
---@return boolean ok Whether it is successful or not.
---@return any ... Return value or error.
function M.xpcall(fn, err, ...) end

--- coroutine-safe pcall。
---@param fn function The called function.
---@param ... any parameter.
---@return boolean ok Whether it is successful or not.
---@return any ... Return value or error.
function M.pcall(fn, ...) end

--- Returns the currently running coroutine.
---@return thread? co Current coroutine.
function M.running() end

return M
