mirror of
https://github.com/neovim/neovim.git
synced 2024-12-23 20:55:18 -07:00
fix(types): add some return/parameter type annotations (#24867)
* fix(types): add some return/parameter type annotations * fix(types): narrow stdpath parameter further
This commit is contained in:
parent
2bf3e82676
commit
b7d5b55f74
@ -1567,6 +1567,9 @@ vim.deprecate({name}, {alternative}, {version}, {plugin}, {backtrace})
|
|||||||
vim.inspect *vim.inspect()*
|
vim.inspect *vim.inspect()*
|
||||||
Gets a human-readable representation of the given object.
|
Gets a human-readable representation of the given object.
|
||||||
|
|
||||||
|
Return: ~
|
||||||
|
(string)
|
||||||
|
|
||||||
See also: ~
|
See also: ~
|
||||||
• |vim.print()|
|
• |vim.print()|
|
||||||
• https://github.com/kikito/inspect.lua
|
• https://github.com/kikito/inspect.lua
|
||||||
|
@ -188,6 +188,7 @@ end
|
|||||||
---@see |vim.print()|
|
---@see |vim.print()|
|
||||||
---@see https://github.com/kikito/inspect.lua
|
---@see https://github.com/kikito/inspect.lua
|
||||||
---@see https://github.com/mpeterv/vinspect
|
---@see https://github.com/mpeterv/vinspect
|
||||||
|
---@return string
|
||||||
vim.inspect = vim.inspect
|
vim.inspect = vim.inspect
|
||||||
|
|
||||||
do
|
do
|
||||||
|
8
runtime/lua/vim/_meta/vimfn.lua
generated
8
runtime/lua/vim/_meta/vimfn.lua
generated
@ -3297,8 +3297,8 @@ function vim.fn.getpid() end
|
|||||||
--- call setpos("'a", save_a_mark)
|
--- call setpos("'a", save_a_mark)
|
||||||
--- <Also see |getcharpos()|, |getcurpos()| and |setpos()|.
|
--- <Also see |getcharpos()|, |getcurpos()| and |setpos()|.
|
||||||
---
|
---
|
||||||
--- @param expr any
|
--- @param expr string
|
||||||
--- @return any
|
--- @return integer[]
|
||||||
function vim.fn.getpos(expr) end
|
function vim.fn.getpos(expr) end
|
||||||
|
|
||||||
--- Returns a |List| with all the current quickfix errors. Each
|
--- Returns a |List| with all the current quickfix errors. Each
|
||||||
@ -8827,8 +8827,8 @@ function vim.fn.stdioopen(opts) end
|
|||||||
--- echo stdpath("config")
|
--- echo stdpath("config")
|
||||||
--- <
|
--- <
|
||||||
---
|
---
|
||||||
--- @param what any
|
--- @param what 'cache'|'config'|'config_dirs'|'data'|'data_dirs'|'log'|'run'|'state'
|
||||||
--- @return any
|
--- @return string|string[]
|
||||||
function vim.fn.stdpath(what) end
|
function vim.fn.stdpath(what) end
|
||||||
|
|
||||||
--- Convert String {string} to a Float. This mostly works the
|
--- Convert String {string} to a Float. This mostly works the
|
||||||
|
@ -4092,7 +4092,8 @@ M.funcs = {
|
|||||||
|
|
||||||
]=],
|
]=],
|
||||||
name = 'getpos',
|
name = 'getpos',
|
||||||
params = { { 'expr', 'any' } },
|
params = { { 'expr', 'string' } },
|
||||||
|
returns = 'integer[]',
|
||||||
signature = 'getpos({expr})',
|
signature = 'getpos({expr})',
|
||||||
},
|
},
|
||||||
getqflist = {
|
getqflist = {
|
||||||
@ -10459,7 +10460,8 @@ M.funcs = {
|
|||||||
]=],
|
]=],
|
||||||
fast = true,
|
fast = true,
|
||||||
name = 'stdpath',
|
name = 'stdpath',
|
||||||
params = { { 'what', 'any' } },
|
params = { { 'what', "'cache'|'config'|'config_dirs'|'data'|'data_dirs'|'log'|'run'|'state'" } },
|
||||||
|
returns = 'string|string[]',
|
||||||
signature = 'stdpath({what})',
|
signature = 'stdpath({what})',
|
||||||
},
|
},
|
||||||
state = {
|
state = {
|
||||||
|
Loading…
Reference in New Issue
Block a user