@@ -86,7 +86,7 @@ public final class JSPromise: JSBridgedClass {
8686
8787 /// Schedules the `success` closure to be invoked on successful completion of `self`.
8888 @discardableResult
89- public func then( success: @escaping ( JSValue ) -> some ConvertibleToJSValue ) -> JSPromise {
89+ public func then( success: @escaping ( JSValue ) -> JSValue ) -> JSPromise {
9090 let closure = JSOneshotClosure {
9191 success ( $0 [ 0 ] ) . jsValue
9292 }
@@ -98,7 +98,7 @@ public final class JSPromise: JSBridgedClass {
9898 @available ( macOS 10 . 15 , iOS 13 . 0 , watchOS 6 . 0 , tvOS 13 . 0 , * )
9999 @discardableResult
100100 public func then(
101- success: sending @escaping ( sending JSValue) async throws -> some ConvertibleToJSValue
101+ success: sending @escaping ( sending JSValue) async throws -> JSValue
102102 ) -> JSPromise {
103103 let closure = JSOneshotClosure . async {
104104 try await success ( $0 [ 0 ] ) . jsValue
@@ -110,8 +110,8 @@ public final class JSPromise: JSBridgedClass {
110110 /// Schedules the `success` closure to be invoked on successful completion of `self`.
111111 @discardableResult
112112 public func then(
113- success: @escaping ( sending JSValue) -> some ConvertibleToJSValue ,
114- failure: @escaping ( sending JSValue) -> some ConvertibleToJSValue
113+ success: @escaping ( sending JSValue) -> JSValue ,
114+ failure: @escaping ( sending JSValue) -> JSValue
115115 ) -> JSPromise {
116116 let successClosure = JSOneshotClosure {
117117 success ( $0 [ 0 ] ) . jsValue
@@ -127,8 +127,8 @@ public final class JSPromise: JSBridgedClass {
127127 @available ( macOS 10 . 15 , iOS 13 . 0 , watchOS 6 . 0 , tvOS 13 . 0 , * )
128128 @discardableResult
129129 public func then(
130- success: sending @escaping ( sending JSValue) async throws -> some ConvertibleToJSValue ,
131- failure: sending @escaping ( sending JSValue) async throws -> some ConvertibleToJSValue
130+ success: sending @escaping ( sending JSValue) async throws -> JSValue ,
131+ failure: sending @escaping ( sending JSValue) async throws -> JSValue
132132 ) -> JSPromise {
133133 let successClosure = JSOneshotClosure . async {
134134 try await success ( $0 [ 0 ] ) . jsValue
@@ -143,7 +143,7 @@ public final class JSPromise: JSBridgedClass {
143143 /// Schedules the `failure` closure to be invoked on rejected completion of `self`.
144144 @discardableResult
145145 public func `catch`(
146- failure: @escaping ( sending JSValue) -> some ConvertibleToJSValue
146+ failure: @escaping ( sending JSValue) -> JSValue
147147 )
148148 -> JSPromise
149149 {
@@ -158,7 +158,7 @@ public final class JSPromise: JSBridgedClass {
158158 @available ( macOS 10 . 15 , iOS 13 . 0 , watchOS 6 . 0 , tvOS 13 . 0 , * )
159159 @discardableResult
160160 public func `catch`(
161- failure: sending @escaping ( sending JSValue) async throws -> some ConvertibleToJSValue
161+ failure: sending @escaping ( sending JSValue) async throws -> JSValue
162162 ) -> JSPromise {
163163 let closure = JSOneshotClosure . async {
164164 try await failure ( $0 [ 0 ] ) . jsValue
0 commit comments