From 6b461635230ccb5d0037f378fbe05a27c4ccf7cd Mon Sep 17 00:00:00 2001 From: Tyler Miller Date: Sun, 11 Aug 2024 06:24:29 -0700 Subject: [PATCH] chore(config): add types --- lua/github-theme/config.lua | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lua/github-theme/config.lua b/lua/github-theme/config.lua index fad100c..a48bebb 100644 --- a/lua/github-theme/config.lua +++ b/lua/github-theme/config.lua @@ -185,19 +185,27 @@ end ---@param opts GhTheme.Config.Options function M.set_options(opts) opts = opts or {} + ---@type GhTheme.Config.Options M.options = collect.deep_extend(M.options, opts) M.has_options = true end function M.reset() + ---@type GhTheme.Config.Options M.options = collect.deep_copy(defaults) return M end +---@param opts? { output_path?: string, file_suffix?: string, theme?: string } +---@return string +---@return string function M.get_compiled_info(opts) opts = opts or {} local output_path = opts.output_path or M.options.compile_path local file_suffix = opts.file_suffix or M.options.compile_file_suffix + + ---@cast output_path -? + ---@cast file_suffix -? return output_path, util.join_paths(output_path, (opts.theme or M.theme) .. file_suffix) end