From 3c62386a396ae0c1cd7adbaacc379eb4af072a65 Mon Sep 17 00:00:00 2001 From: William Boman Date: Mon, 15 Aug 2022 21:03:06 +0200 Subject: refactor: introduce selene, harden type defs, and use proper EmmyLua syntax (#296) --- lua/mason-core/fetch.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lua/mason-core/fetch.lua') diff --git a/lua/mason-core/fetch.lua b/lua/mason-core/fetch.lua index 8aca8b89..3bb7a214 100644 --- a/lua/mason-core/fetch.lua +++ b/lua/mason-core/fetch.lua @@ -14,12 +14,12 @@ local USER_AGENT = "mason.nvim (+https://github.com/williamboman/mason.nvim)" ---| '"PATCH"' ---| '"DELETE"' ----@alias FetchOpts {out_file: string, method: FetchMethod, headers: table, data: string} +---@alias FetchOpts {out_file: string?, method: FetchMethod?, headers: table?, data: string?} ---@async ----@param url string: The url to fetch. ----@param opts FetchOpts | nil ----@return Result: Result +---@param url string The url to fetch. +---@param opts FetchOpts? +---@return Result # Result local function fetch(url, opts) opts = opts or {} if not opts.headers then -- cgit v1.2.3-70-g09d2