Skip to content

Commit

Permalink
[Docs] Update Promise+Wrap.swift to address DocC warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
ncooke3 authored Nov 5, 2024
1 parent 540318e commit a6fb071
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Sources/Promises/Promise+Wrap.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import Dispatch
/// Provides a convenient way to convert methods that use common callback patterns into `Promise`s.

/// Creates a new promise to be resolved when completion handler gets invoked.
/// - parameter queue: A queue to dispatch on.
/// - parameter work: A block to execute asynchronously to invoke some API that requires
/// a completion handler with no arguments.
/// - returns: A new pending promise to be resolved with `nil` when completion handler finishes.
Expand All @@ -30,6 +31,7 @@ public func wrap(
}

/// Creates a new promise to be resolved when completion handler gets invoked.
/// - parameter queue: A queue to dispatch on.
/// - parameter work: A block to execute asynchronously to invoke some API that requires
/// a completion handler with one argument of generic `Value` type.
/// - returns: A new pending promise to be resolved with the value provided by completion handler
Expand All @@ -44,6 +46,7 @@ public func wrap<Value>(
}

/// Creates a new promise to be resolved when completion handler gets invoked.
/// - parameter queue: A queue to dispatch on.
/// - parameter work: A block to execute asynchronously to invoke some API that requires
/// a completion handler with one argument of optional generic `Value` type.
/// - returns: A new pending promise to be resolved with the value or error provided by completion
Expand All @@ -58,6 +61,7 @@ public func wrap<Value>(
}

/// Creates a new promise to be resolved when completion handler gets invoked.
/// - parameter queue: A queue to dispatch on.
/// - parameter work: A block to execute asynchronously to invoke some API that requires
/// a completion handler with two arguments: a generic of `Value` type and
/// an optional `Error`.
Expand All @@ -79,6 +83,7 @@ public func wrap<Value>(
}

/// Creates a new promise to be resolved when completion handler gets invoked.
/// - parameter queue: A queue to dispatch on.
/// - parameter work: A block to execute asynchronously to invoke some API that requires
/// a completion handler with two arguments: an optional `Error` and a generic of
/// `Value` type.
Expand All @@ -100,6 +105,7 @@ public func wrap<Value>(
}

/// Creates a new promise to be resolved when completion handler gets invoked.
/// - parameter queue: A queue to dispatch on.
/// - parameter work: A block to execute asynchronously to invoke some API that requires
/// a completion handler with two arguments: an optional generic of `Value` type
/// and an optional `Error`.
Expand All @@ -121,6 +127,7 @@ public func wrap<Value>(
}

/// Creates a new promise to be resolved when completion handler gets invoked.
/// - parameter queue: A queue to dispatch on.
/// - parameter work: A block to execute asynchronously to invoke some API that requires
/// a completion handler with two arguments: an optional `Error` and an optional
/// generic of `Value` type.
Expand All @@ -142,6 +149,7 @@ public func wrap<Value>(
}

/// Creates a new promise to be resolved when completion handler gets invoked.
/// - parameter queue: A queue to dispatch on.
/// - parameter work: A block to execute asynchronously to invoke some API that requires
/// a completion handler with three arguments: two optionals of `Any` type
/// and an optional `Error`.
Expand Down

0 comments on commit a6fb071

Please sign in to comment.