fix(types): correct LuaLS annotations in oauth and gcal
This commit is contained in:
parent
bc2a106617
commit
4187357a41
2 changed files with 5 additions and 4 deletions
|
|
@ -169,7 +169,8 @@ function M.push()
|
|||
)
|
||||
|
||||
if should_delete then
|
||||
local del_err = delete_event(access_token, cal_id, event_id)
|
||||
local del_err =
|
||||
delete_event(access_token, cal_id --[[@as string]], event_id --[[@as string]])
|
||||
if del_err then
|
||||
vim.notify('pending.nvim: gcal delete failed: ' .. del_err, vim.log.levels.WARN)
|
||||
else
|
||||
|
|
|
|||
|
|
@ -29,18 +29,18 @@ local M = {}
|
|||
|
||||
---@param args string[]
|
||||
---@param opts? table
|
||||
---@return vim.SystemCompleted
|
||||
---@return { code: integer, stdout: string, stderr: string }
|
||||
function M.system(args, opts)
|
||||
local co = coroutine.running()
|
||||
if not co then
|
||||
return vim.system(args, opts or {}):wait()
|
||||
return vim.system(args, opts or {}):wait() --[[@as { code: integer, stdout: string, stderr: string }]]
|
||||
end
|
||||
vim.system(args, opts or {}, function(result)
|
||||
vim.schedule(function()
|
||||
coroutine.resume(co, result)
|
||||
end)
|
||||
end)
|
||||
return coroutine.yield()
|
||||
return coroutine.yield() --[[@as { code: integer, stdout: string, stderr: string }]]
|
||||
end
|
||||
|
||||
---@param fn fun(): nil
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue