Skip to content

Commit d514129

Browse files
Restore ClientEvent
1 parent bb2848e commit d514129

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Sources/LanguageServerProtocol/LanguageServerProtocol.swift

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,15 @@ public enum ProtocolError: Error {
1010
case missingReply
1111
}
1212

13+
public enum ClientEvent: Sendable {
14+
public typealias RequestResult = Result<Encodable & Sendable, AnyJSONRPCResponseError>
15+
public typealias RequestHandler = @Sendable (RequestResult) async -> Void
16+
17+
case request(id: JSONId, request: ClientRequest)
18+
case notification(ClientNotification)
19+
case error(Error)
20+
}
21+
1322
public enum ServerEvent: Sendable {
1423
public typealias RequestResult = Result<Encodable & Sendable, AnyJSONRPCResponseError>
1524
public typealias RequestHandler = @Sendable (RequestResult) async -> Void

0 commit comments

Comments
 (0)