@@ -43,8 +43,10 @@ public struct CompletionKind {
4343 case custom( @Sendable ( [ String ] , Int , String ) -> [ String ] )
4444 #if !canImport(Dispatch)
4545 @available ( * , unavailable, message: " DispatchSemaphore is unavailable " )
46- #endif
4746 case customAsync( @Sendable ( [ String] , Int, String) async -> [ String ] )
47+ #else
48+ case customAsync( @Sendable ( [ String] , Int, String) async -> [ String ] )
49+ #endif
4850 case customDeprecated( @Sendable ( [ String ] ) -> [ String ] )
4951 }
5052
@@ -186,17 +188,20 @@ public struct CompletionKind {
186188 /// except that the closure is asynchronous.
187189 #if !canImport(Dispatch)
188190 @available ( * , unavailable, message: " DispatchSemaphore is unavailable " )
189- #endif
190191 @available ( macOS 10 . 15 , macCatalyst 13 , iOS 13 , tvOS 13 , watchOS 6 , * )
191192 public static func custom(
192193 _ completion: @Sendable @escaping ( [ String] , Int, String) async -> [ String ]
193194 ) -> CompletionKind {
194- #if !canImport(Dispatch)
195195 fatalError ( " DispatchSemaphore is unavailable " )
196- #else
196+ }
197+ #else
198+ @available ( macOS 10 . 15 , macCatalyst 13 , iOS 13 , tvOS 13 , watchOS 6 , * )
199+ public static func custom(
200+ _ completion: @Sendable @escaping ( [ String] , Int, String) async -> [ String ]
201+ ) -> CompletionKind {
197202 CompletionKind ( kind: . customAsync( completion) )
198- #endif
199203 }
204+ #endif
200205
201206 /// Deprecated; only kept for backwards compatibility.
202207 ///
0 commit comments