Skip to content

Commit 5b03dca

Browse files
committed
chore: fix types
1 parent 1ce1143 commit 5b03dca

File tree

3 files changed

+6
-17
lines changed

3 files changed

+6
-17
lines changed

lua/java-core/ls/clients/java-debug-client.lua

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,13 @@ local JdtlsClient = require('java-core.ls.clients.jdtls-client')
55
---@class java-core.DebugClient: java-core.JdtlsClient
66
local DebugClient = class(JdtlsClient)
77

8-
function DebugClient:_init(client)
9-
self:super(client)
10-
end
11-
12-
---@class JavaDebugResolveMainClassRecord
8+
---@class java-dap.JavaDebugResolveMainClassRecord
139
---@field mainClass string
1410
---@field projectName string
1511
---@field fileName string
1612

1713
---Returns a list of main classes in the current workspace
18-
---@return JavaDebugResolveMainClassRecord[] # resolved main class
14+
---@return java-dap.JavaDebugResolveMainClassRecord[] # resolved main class
1915
function DebugClient:resolve_main_class()
2016
return self:workspace_execute_command('vscode.java.resolveMainClass')
2117
end

lua/java-core/ls/clients/java-test-client.lua

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,26 +14,18 @@ local JdtlsClient = require('java-core.ls.clients.jdtls-client')
1414
---@field uri string
1515

1616
---@class java-core.TestDetailsWithRange: java-core.TestDetails
17-
---@field range java-core.TestRange
17+
---@field range lsp.Range
1818

1919
---@class java-core.TestDetailsWithChildren: java-core.TestDetails
2020
---@field children java-core.TestDetailsWithRange[]
2121

2222
---@class java-core.TestDetailsWithChildrenAndRange: java-core.TestDetails
23-
---@field range java-core.TestRange
23+
---@field range lsp.Range
2424
---@field children java-core.TestDetailsWithRange[]
2525

26-
---@class java-core.TestRange
27-
---@field start nvim.CursorPoint
28-
---@field end nvim.CursorPoint
29-
3026
---@class java-core.TestClient: java-core.JdtlsClient
3127
local TestClient = class(JdtlsClient)
3228

33-
function TestClient:_init(client)
34-
self:super(client)
35-
end
36-
3729
---Returns a list of project details in the current root
3830
---@return java-core.TestDetails[] # test details of the projects
3931
function TestClient:find_java_projects()
@@ -89,7 +81,7 @@ function TestClient:resolve_junit_launch_arguments(args)
8981
vim.fn.json_encode(args)
9082
)
9183

92-
if not launch_args.body then
84+
if not launch_args or not launch_args.body then
9385
local msg = 'Failed to retrive JUnit launch arguments'
9486

9587
log.error(msg, launch_args)

lua/java-core/ls/clients/jdtls-client.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ function JdtlsClient:request(method, params, buffer)
7272
callback(err, result)
7373
end
7474

75+
---@diagnostic disable-next-line: param-type-mismatch
7576
return self.client.request(method, params, on_response, buffer)
7677
end)
7778
end

0 commit comments

Comments
 (0)