docs: better comments for Cache.find

This commit is contained in:
Folke Lemaitre 2023-03-16 14:13:18 +01:00
parent 6b55862d2d
commit 2e3c16e526
No known key found for this signature in database
GPG Key ID: 41F8B1FBACAE2040
1 changed files with 3 additions and 1 deletions

View File

@ -273,7 +273,9 @@ end
---@param opts? ModuleFindOpts (table|nil) Options for finding a module:
--- - rtp: (boolean) Search for modname in the runtime path (defaults to `true`)
--- - paths: (string[]) Extra paths to search for modname (defaults to `{}`)
--- - patterns: (string[]) Paterns to use (defaults to `{"/init.lua", ".lua"}`)
--- - patterns: (string[]) List of patterns to use when searching for modules.
-- A pattern is a string added to the basename of the Lua module being searched.
-- (defaults to `{"/init.lua", ".lua"}`)
-- - all: (boolean) Return all matches instead of just the first one (defaults to `false`)
---@return ModuleInfo[] (list) A list of results with the following properties:
--- - modpath: (string) the path to the module