We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
JSPromise.Result
Swift.Result
JSPromise.result
1 parent 39c207b commit 0fc7f41Copy full SHA for 0fc7f41
Sources/JavaScriptEventLoop/JavaScriptEventLoop.swift
@@ -227,7 +227,7 @@ public extension JSPromise {
227
}
228
229
/// Wait for the promise to complete, returning its result or exception as a Result.
230
- var result: Swift.Result<JSValue, JSException> {
+ var result: JSPromise.Result {
231
get async {
232
await withUnsafeContinuation { [self] continuation in
233
self.then(
@@ -236,7 +236,7 @@ public extension JSPromise {
236
return JSValue.undefined
237
},
238
failure: {
239
- continuation.resume(returning: .failure(JSException($0)))
+ continuation.resume(returning: .failure($0))
240
241
242
)
0 commit comments