From b7d5b55f74fd589dee27d8356d45b31c552705c3 Mon Sep 17 00:00:00 2001 From: Maria José Solano Date: Sun, 27 Aug 2023 01:41:32 -0700 Subject: fix(types): add some return/parameter type annotations (#24867) * fix(types): add some return/parameter type annotations * fix(types): narrow stdpath parameter further --- runtime/doc/lua.txt | 3 +++ runtime/lua/vim/_editor.lua | 1 + runtime/lua/vim/_meta/vimfn.lua | 8 ++++---- 3 files changed, 8 insertions(+), 4 deletions(-) (limited to 'runtime') diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt index 39eb530c24..f5b3e56f61 100644 --- a/runtime/doc/lua.txt +++ b/runtime/doc/lua.txt @@ -1567,6 +1567,9 @@ vim.deprecate({name}, {alternative}, {version}, {plugin}, {backtrace}) vim.inspect *vim.inspect()* Gets a human-readable representation of the given object. + Return: ~ + (string) + See also: ~ • |vim.print()| • https://github.com/kikito/inspect.lua diff --git a/runtime/lua/vim/_editor.lua b/runtime/lua/vim/_editor.lua index 8c10cc7da3..96ac379368 100644 --- a/runtime/lua/vim/_editor.lua +++ b/runtime/lua/vim/_editor.lua @@ -188,6 +188,7 @@ end ---@see |vim.print()| ---@see https://github.com/kikito/inspect.lua ---@see https://github.com/mpeterv/vinspect +---@return string vim.inspect = vim.inspect do diff --git a/runtime/lua/vim/_meta/vimfn.lua b/runtime/lua/vim/_meta/vimfn.lua index ebd74046ce..d9d3c92a44 100644 --- a/runtime/lua/vim/_meta/vimfn.lua +++ b/runtime/lua/vim/_meta/vimfn.lua @@ -3297,8 +3297,8 @@ function vim.fn.getpid() end --- call setpos("'a", save_a_mark) ---