Skip to content

Commit

Permalink
Restore ClientEvent
Browse files Browse the repository at this point in the history
  • Loading branch information
mattmassicotte committed Oct 2, 2024
1 parent bb2848e commit d514129
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Sources/LanguageServerProtocol/LanguageServerProtocol.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,15 @@ public enum ProtocolError: Error {
case missingReply
}

public enum ClientEvent: Sendable {
public typealias RequestResult = Result<Encodable & Sendable, AnyJSONRPCResponseError>
public typealias RequestHandler = @Sendable (RequestResult) async -> Void

case request(id: JSONId, request: ClientRequest)
case notification(ClientNotification)
case error(Error)
}

public enum ServerEvent: Sendable {
public typealias RequestResult = Result<Encodable & Sendable, AnyJSONRPCResponseError>
public typealias RequestHandler = @Sendable (RequestResult) async -> Void
Expand Down

0 comments on commit d514129

Please sign in to comment.