fix(test): typing

This commit is contained in:
Lewis Russell
2024-03-25 19:06:28 +00:00
committed by Lewis Russell
parent 3fd8292aaf
commit a7bbda121d
15 changed files with 180 additions and 186 deletions

View File

@@ -128,6 +128,18 @@ local function fake_lsp_server_setup(test_name, timeout_ms, options, settings)
)
end
--- @class test.lsp.Config
--- @field test_name string
--- @field timeout_ms? integer
--- @field options? table
--- @field settings? table
---
--- @field on_setup? fun()
--- @field on_init? fun(client: vim.lsp.Client, ...)
--- @field on_handler? fun(...)
--- @field on_exit? fun(code: integer, signal: integer)
--- @param config test.lsp.Config
function M.test_rpc_server(config)
if config.test_name then
M.clear_notrace()
@@ -158,6 +170,7 @@ function M.test_rpc_server(config)
end
end,
})
--- @type integer, integer
local code, signal
local function on_request(method, args)
if method == 'init' then