mirror of
https://github.com/neovim/neovim.git
synced 2025-11-16 07:11:20 +00:00
feat(meta): vendor luv meta files
Problem: No type information for `vim.uv`. Solution: Vendor https://github.com/LuaCATS/luv (which is what luals bundles). This will allow other tooling to work out-of-the-box and make these files available to users and plugins without the need for `lazydev.nvim` etc.
This commit is contained in:
committed by
Christian Clason
parent
627d0a2b32
commit
0ee5a4d481
36
runtime/lua/uv/_meta/luv_dir_t.lua
Normal file
36
runtime/lua/uv/_meta/luv_dir_t.lua
Normal file
@@ -0,0 +1,36 @@
|
||||
---@meta
|
||||
-- luacheck: no unused args
|
||||
error('Cannot require a meta file')
|
||||
|
||||
--- luv_dir_t
|
||||
---
|
||||
---@class uv.luv_dir_t : userdata
|
||||
local dir = {} -- luacheck: no unused
|
||||
|
||||
--- Closes a directory stream returned by a successful `uv.fs_opendir()` call.
|
||||
---
|
||||
---@return boolean|nil success
|
||||
---@return uv.error.message|nil err
|
||||
---@return uv.error.name|nil err_name
|
||||
---
|
||||
---@overload fun(self:uv.luv_dir_t, callback:uv.fs_closedir.callback):uv.uv_fs_t
|
||||
function dir:closedir() end
|
||||
|
||||
--- Iterates over the directory stream `luv_dir_t` returned by a successful
|
||||
--- `uv.fs_opendir()` call. A table of data tables is returned where the number
|
||||
--- of entries `n` is equal to or less than the `entries` parameter used in
|
||||
--- the associated `uv.fs_opendir()` call.
|
||||
---
|
||||
--- **Returns (sync version):** `table` or `fail`
|
||||
--- - `[1, 2, 3, ..., n]` : `table`
|
||||
--- - `name` : `string`
|
||||
--- - `type` : `string`
|
||||
---
|
||||
--- **Returns (async version):** `uv_fs_t userdata`
|
||||
---
|
||||
---@return uv.fs_readdir.entry[]|nil entries
|
||||
---@return uv.error.message|nil err
|
||||
---@return uv.error.name|nil err_name
|
||||
---
|
||||
---@overload fun(self:uv.luv_dir_t, callback:uv.fs_readdir.callback):uv.uv_fs_t
|
||||
function dir:readdir() end
|
||||
Reference in New Issue
Block a user