mirror of
https://github.com/neovim/neovim.git
synced 2025-10-21 01:02:09 +00:00
fix: type fixes
Type fixes caught by emmylua
This commit is contained in:

committed by
Lewis Russell

parent
4c333fdbb7
commit
3b6084ddf4
@@ -37,6 +37,10 @@ function F.ok_or_nil(status, ...)
|
||||
end
|
||||
|
||||
-- Nil pcall.
|
||||
--- @generic T
|
||||
--- @param fn fun(...):T
|
||||
--- @param ... T?
|
||||
--- @return T
|
||||
function F.npcall(fn, ...)
|
||||
return F.ok_or_nil(pcall(fn, ...))
|
||||
end
|
||||
|
Reference in New Issue
Block a user