Resolver

public final class Resolver<T>

An object for resolving promises

  • Fulfills the promise with the provided value

    Declaration

    Swift

    func fulfill(_ value: T)
  • Rejects the promise with the provided error

    Declaration

    Swift

    func reject(_ error: Error)
  • Resolves the promise with the provided result

    Declaration

    Swift

    func resolve(_ result: Result<T>)
  • Resolves the promise with the provided value or error

    Declaration

    Swift

    func resolve(_ obj: T?, _ error: Error?)
  • Fulfills the promise with the provided value unless the provided error is non-nil

    Declaration

    Swift

    func resolve(_ obj: T, _ error: Error?)
  • Resolves the promise, provided for non-conventional value-error ordered completion handlers.

    Declaration

    Swift

    func resolve(_ error: Error?, _ obj: T?)

Available where T == Void