diff options
author | Christian Clason <c.clason@uni-graz.at> | 2023-08-09 11:06:13 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-09 11:06:13 +0200 |
commit | c43c745a14dced87a23227d7be4f1c33d4455193 (patch) | |
tree | 0cd5cf1cbbfa20be7fffbad696ba5ee97181847e /runtime/lua/vim/_watch.lua | |
parent | 8afdc1f3867a620c8235b3d3964b019b94657190 (diff) | |
download | rneovim-c43c745a14dced87a23227d7be4f1c33d4455193.tar.gz rneovim-c43c745a14dced87a23227d7be4f1c33d4455193.tar.bz2 rneovim-c43c745a14dced87a23227d7be4f1c33d4455193.zip |
fix(lua): improve annotations for stricter luals diagnostics (#24609)
Problem: luals returns stricter diagnostics with bundled luarc.json
Solution: Improve some function and type annotations:
* use recognized uv.* types
* disable diagnostic for global `vim` in shared.lua
* docs: don't start comment lines with taglink (otherwise LuaLS will interpret it as a type)
* add type alias for lpeg pattern
* fix return annotation for `vim.secure.trust`
* rename local Range object in vim.version (shadows `Range` in vim.treesitter)
* fix some "missing fields" warnings
* add missing required fields for test functions in eval.lua
* rename lsp meta files for consistency
Diffstat (limited to 'runtime/lua/vim/_watch.lua')
-rw-r--r-- | runtime/lua/vim/_watch.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/lua/vim/_watch.lua b/runtime/lua/vim/_watch.lua index dc5f59f38b..7230b31f6f 100644 --- a/runtime/lua/vim/_watch.lua +++ b/runtime/lua/vim/_watch.lua @@ -17,7 +17,7 @@ end --- Stops and closes a libuv |uv_fs_event_t| or |uv_fs_poll_t| handle --- ----@param handle (uv_fs_event_t|uv_fs_poll_t) The handle to stop +---@param handle (uv.uv_fs_event_t|uv.uv_fs_poll_t) The handle to stop local function stop(handle) local _, stop_err = handle:stop() assert(not stop_err, stop_err) @@ -79,7 +79,7 @@ local default_poll_interval_ms = 2000 --- @field children? table<string,watch.Watches> --- @field cancel? fun() --- @field started? boolean ---- @field handle? uv_fs_poll_t +--- @field handle? uv.uv_fs_poll_t --- @class watch.PollOpts --- @field interval? integer |