You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|Summary |Provides an `AsyncPhase` value that represents a result of the given asynchronous throwable function.|
522
+
|Output |`AsyncPhase<T, E: Error>` (`AsyncPhase<T, any Error>` in Swift 5)|
523
+
|Use Case |Throwing or non-throwing asynchronous operation e.g. API call|
524
+
525
+
Note:
526
+
The [typed throws](https://github.com/swiftlang/swift-evolution/blob/main/proposals/0413-typed-throws.md) feature introduced in Swift 6 allows the `Failure` type of the produced `AsyncPhase` to be specified as any type or even non-throwing, but in Swift 5 without it, the `Failure` type is always be `any Error`.
527
+
Here is a chart of the syntax in `typed throws` and the type of resulting `AsyncPhase`.
0 commit comments