@@ -86,7 +86,7 @@ public final class JSPromise: JSBridgedClass { |
86 | 86 |
|
87 | 87 | /// Schedules the `success` closure to be invoked on successful completion of `self`. |
88 | 88 | @discardableResult |
89 | | - public func then(success: @escaping (JSValue) -> some ConvertibleToJSValue) -> JSPromise { |
| 89 | + public func then(success: @escaping (JSValue) -> JSValue) -> JSPromise { |
90 | 90 | let closure = JSOneshotClosure { |
91 | 91 | success($0[0]).jsValue |
92 | 92 | } |
@@ -98,7 +98,7 @@ public final class JSPromise: JSBridgedClass { |
98 | 98 | @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) |
99 | 99 | @discardableResult |
100 | 100 | public func then( |
101 | | - success: sending @escaping (sending JSValue) async throws -> some ConvertibleToJSValue |
| 101 | + success: sending @escaping (sending JSValue) async throws -> JSValue |
102 | 102 | ) -> JSPromise { |
103 | 103 | let closure = JSOneshotClosure.async { |
104 | 104 | try await success($0[0]).jsValue |
@@ -110,8 +110,8 @@ public final class JSPromise: JSBridgedClass { |
110 | 110 | /// Schedules the `success` closure to be invoked on successful completion of `self`. |
111 | 111 | @discardableResult |
112 | 112 | 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 |
115 | 115 | ) -> JSPromise { |
116 | 116 | let successClosure = JSOneshotClosure { |
117 | 117 | success($0[0]).jsValue |
@@ -127,8 +127,8 @@ public final class JSPromise: JSBridgedClass { |
127 | 127 | @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) |
128 | 128 | @discardableResult |
129 | 129 | 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 |
132 | 132 | ) -> JSPromise { |
133 | 133 | let successClosure = JSOneshotClosure.async { |
134 | 134 | try await success($0[0]).jsValue |
@@ -143,7 +143,7 @@ public final class JSPromise: JSBridgedClass { |
143 | 143 | /// Schedules the `failure` closure to be invoked on rejected completion of `self`. |
144 | 144 | @discardableResult |
145 | 145 | public func `catch`( |
146 | | - failure: @escaping (sending JSValue) -> some ConvertibleToJSValue |
| 146 | + failure: @escaping (sending JSValue) -> JSValue |
147 | 147 | ) |
148 | 148 | -> JSPromise |
149 | 149 | { |
@@ -158,7 +158,7 @@ public final class JSPromise: JSBridgedClass { |
158 | 158 | @available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) |
159 | 159 | @discardableResult |
160 | 160 | public func `catch`( |
161 | | - failure: sending @escaping (sending JSValue) async throws -> some ConvertibleToJSValue |
| 161 | + failure: sending @escaping (sending JSValue) async throws -> JSValue |
162 | 162 | ) -> JSPromise { |
163 | 163 | let closure = JSOneshotClosure.async { |
164 | 164 | try await failure($0[0]).jsValue |
|