feat(lua): deprecate vim.tbl_add_reverse_lookup

This commit is contained in:
Maria José Solano
2024-03-02 13:11:23 -08:00
committed by Christian Clason
parent 6525832a8c
commit e52c25b761
9 changed files with 66 additions and 68 deletions

View File

@ -465,9 +465,12 @@ end
--- `tbl_add_reverse_lookup { A = 1 } == { [1] = 'A', A = 1 }`
---
--- Note that this *modifies* the input.
---@deprecated
---@param o table Table to add the reverse to
---@return table o
function vim.tbl_add_reverse_lookup(o)
vim.deprecate('vim.tbl_add_reverse_lookup', nil, '0.12')
--- @cast o table<any,any>
--- @type any[]
local keys = vim.tbl_keys(o)