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
|
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
|
if del_err then
|
||||||
vim.notify('pending.nvim: gcal delete failed: ' .. del_err, vim.log.levels.WARN)
|
vim.notify('pending.nvim: gcal delete failed: ' .. del_err, vim.log.levels.WARN)
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -29,18 +29,18 @@ local M = {}
|
||||||
|
|
||||||
---@param args string[]
|
---@param args string[]
|
||||||
---@param opts? table
|
---@param opts? table
|
||||||
---@return vim.SystemCompleted
|
---@return { code: integer, stdout: string, stderr: string }
|
||||||
function M.system(args, opts)
|
function M.system(args, opts)
|
||||||
local co = coroutine.running()
|
local co = coroutine.running()
|
||||||
if not co then
|
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
|
end
|
||||||
vim.system(args, opts or {}, function(result)
|
vim.system(args, opts or {}, function(result)
|
||||||
vim.schedule(function()
|
vim.schedule(function()
|
||||||
coroutine.resume(co, result)
|
coroutine.resume(co, result)
|
||||||
end)
|
end)
|
||||||
end)
|
end)
|
||||||
return coroutine.yield()
|
return coroutine.yield() --[[@as { code: integer, stdout: string, stderr: string }]]
|
||||||
end
|
end
|
||||||
|
|
||||||
---@param fn fun(): nil
|
---@param fn fun(): nil
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue