@@ -97,7 +97,9 @@ public final class JSPromise: JSBridgedClass {
97
97
/// Schedules the `success` closure to be invoked on successful completion of `self`.
98
98
@available ( macOS 10 . 15 , iOS 13 . 0 , watchOS 6 . 0 , tvOS 13 . 0 , * )
99
99
@discardableResult
100
- public func then( success: sending @escaping ( sending JSValue) async throws -> some ConvertibleToJSValue ) -> JSPromise {
100
+ public func then(
101
+ success: sending @escaping ( sending JSValue) async throws -> some ConvertibleToJSValue
102
+ ) -> JSPromise {
101
103
let closure = JSOneshotClosure . async {
102
104
try await success ( $0 [ 0 ] ) . jsValue
103
105
}
@@ -140,7 +142,9 @@ public final class JSPromise: JSBridgedClass {
140
142
141
143
/// Schedules the `failure` closure to be invoked on rejected completion of `self`.
142
144
@discardableResult
143
- public func `catch`( failure: @escaping ( sending JSValue) -> some ConvertibleToJSValue )
145
+ public func `catch`(
146
+ failure: @escaping ( sending JSValue) -> some ConvertibleToJSValue
147
+ )
144
148
-> JSPromise
145
149
{
146
150
let closure = JSOneshotClosure {
@@ -153,8 +157,9 @@ public final class JSPromise: JSBridgedClass {
153
157
/// Schedules the `failure` closure to be invoked on rejected completion of `self`.
154
158
@available ( macOS 10 . 15 , iOS 13 . 0 , watchOS 6 . 0 , tvOS 13 . 0 , * )
155
159
@discardableResult
156
- public func `catch`( failure: sending @escaping ( sending JSValue) async throws -> some ConvertibleToJSValue ) -> JSPromise
157
- {
160
+ public func `catch`(
161
+ failure: sending @escaping ( sending JSValue) async throws -> some ConvertibleToJSValue
162
+ ) -> JSPromise {
158
163
let closure = JSOneshotClosure . async {
159
164
try await failure ( $0 [ 0 ] ) . jsValue
160
165
}
0 commit comments