Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
let onResolve = Observer<Value>.onResolve(ctx, { value in
do {
let chainedPromise = try body(value)
let pResolve = Observer<N>.onResolve(ctx, resolve)
let pReject = Observer<N>.onReject(ctx, reject)
chainedPromise.add(observers: pResolve,pReject)
} catch let error {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment