docs: more accurate typing for vim.tbl_extend

This commit is contained in:
Riley Bruins 2023-12-30 21:08:07 -08:00 committed by Lewis Russell
parent 47942db307
commit 09a919f313
2 changed files with 6 additions and 6 deletions

View File

@ -2190,8 +2190,8 @@ vim.tbl_deep_extend({behavior}, {...}) *vim.tbl_deep_extend()*
Merges recursively two or more tables. Merges recursively two or more tables.
Parameters: ~ Parameters: ~
• {behavior} (`"error"|"keep"|"force"`) (string) Decides what to do if • {behavior} (`'error'|'keep'|'force'`) Decides what to do if a key is
a key is found in more than one map: found in more than one map:
• "error": raise an error • "error": raise an error
• "keep": use value from the leftmost map • "keep": use value from the leftmost map
• "force": use value from the rightmost map • "force": use value from the rightmost map
@ -2207,8 +2207,8 @@ vim.tbl_extend({behavior}, {...}) *vim.tbl_extend()*
Merges two or more tables. Merges two or more tables.
Parameters: ~ Parameters: ~
• {behavior} (`string`) Decides what to do if a key is found in more • {behavior} (`'error'|'keep'|'force'`) Decides what to do if a key is
than one map: found in more than one map:
• "error": raise an error • "error": raise an error
• "keep": use value from the leftmost map • "keep": use value from the leftmost map
• "force": use value from the rightmost map • "force": use value from the rightmost map

View File

@ -402,7 +402,7 @@ end
--- ---
---@see |extend()| ---@see |extend()|
--- ---
---@param behavior string Decides what to do if a key is found in more than one map: ---@param behavior 'error'|'keep'|'force' Decides what to do if a key is found in more than one map:
--- - "error": raise an error --- - "error": raise an error
--- - "keep": use value from the leftmost map --- - "keep": use value from the leftmost map
--- - "force": use value from the rightmost map --- - "force": use value from the rightmost map
@ -418,7 +418,7 @@ end
--- ---
---@generic T1: table ---@generic T1: table
---@generic T2: table ---@generic T2: table
---@param behavior "error"|"keep"|"force" (string) Decides what to do if a key is found in more than one map: ---@param behavior 'error'|'keep'|'force' Decides what to do if a key is found in more than one map:
--- - "error": raise an error --- - "error": raise an error
--- - "keep": use value from the leftmost map --- - "keep": use value from the leftmost map
--- - "force": use value from the rightmost map --- - "force": use value from the rightmost map