mirror of
https://github.com/neovim/neovim.git
synced 2026-04-30 19:24:09 +00:00
docs(annotations): added ---@generic support
This commit is contained in:
committed by
Lewis Russell
parent
65b1733405
commit
f9dd682621
29
runtime/lua/vim/_meta/vimfn.lua
generated
29
runtime/lua/vim/_meta/vimfn.lua
generated
@@ -1147,8 +1147,9 @@ function vim.fn.confirm(msg, choices, default, type) end
|
||||
--- A |Dictionary| is copied in a similar way as a |List|.
|
||||
--- Also see |deepcopy()|.
|
||||
---
|
||||
--- @param expr any
|
||||
--- @return any
|
||||
--- @generic T
|
||||
--- @param expr T
|
||||
--- @return T
|
||||
function vim.fn.copy(expr) end
|
||||
|
||||
--- Return the cosine of {expr}, measured in radians, as a |Float|.
|
||||
@@ -1308,9 +1309,10 @@ function vim.fn.debugbreak(pid) end
|
||||
--- {noref} set to 1 will fail.
|
||||
--- Also see |copy()|.
|
||||
---
|
||||
--- @param expr any
|
||||
--- @generic T
|
||||
--- @param expr T
|
||||
--- @param noref? boolean
|
||||
--- @return any
|
||||
--- @return T
|
||||
function vim.fn.deepcopy(expr, noref) end
|
||||
|
||||
--- Without {flags} or with {flags} empty: Deletes the file by the
|
||||
@@ -4769,7 +4771,7 @@ function vim.fn.isnan(expr) end
|
||||
--- cases, items() returns a List with the index and the value at
|
||||
--- the index.
|
||||
---
|
||||
--- @param dict any
|
||||
--- @param dict table
|
||||
--- @return any
|
||||
function vim.fn.items(dict) end
|
||||
|
||||
@@ -5952,7 +5954,7 @@ function vim.fn.matchstrpos(expr, pat, start, count) end
|
||||
--- an error. An empty |List| or |Dictionary| results in zero.
|
||||
---
|
||||
--- @param expr any
|
||||
--- @return any
|
||||
--- @return number
|
||||
function vim.fn.max(expr) end
|
||||
|
||||
--- Returns a |List| of |Dictionaries| describing |menus| (defined
|
||||
@@ -7016,10 +7018,11 @@ function vim.fn.readfile(fname, type, max) end
|
||||
--- echo reduce('xyz', { acc, val -> acc .. ',' .. val })
|
||||
--- <
|
||||
---
|
||||
--- @generic T
|
||||
--- @param object any
|
||||
--- @param func function
|
||||
--- @param func fun(accumulator: T, current: any): any
|
||||
--- @param initial? any
|
||||
--- @return any
|
||||
--- @return T
|
||||
function vim.fn.reduce(object, func, initial) end
|
||||
|
||||
--- Returns the single letter name of the register being executed.
|
||||
@@ -7215,8 +7218,9 @@ function vim.fn.resolve(filename) end
|
||||
--- let revlist = reverse(copy(mylist))
|
||||
--- <
|
||||
---
|
||||
--- @param object any
|
||||
--- @return any
|
||||
--- @generic T
|
||||
--- @param object T[]
|
||||
--- @return T[]
|
||||
function vim.fn.reverse(object) end
|
||||
|
||||
--- Round off {expr} to the nearest integral value and return it
|
||||
@@ -9079,10 +9083,11 @@ function vim.fn.sockconnect(mode, address, opts) end
|
||||
--- eval mylist->sort({i1, i2 -> i1 - i2})
|
||||
--- <
|
||||
---
|
||||
--- @param list any
|
||||
--- @generic T
|
||||
--- @param list T[]
|
||||
--- @param how? string|function
|
||||
--- @param dict? any
|
||||
--- @return any
|
||||
--- @return T[]
|
||||
function vim.fn.sort(list, how, dict) end
|
||||
|
||||
--- Return the sound-folded equivalent of {word}. Uses the first
|
||||
|
||||
Reference in New Issue
Block a user