Promise

public class Promise<T>: IPromise

Promise

Simple promise with a single callback. Used by client.

  • Runs any callback in background

    Declaration

    Swift

    public func allInBackground() -> Promise<T>

    Return Value

    itself

  • Runs next attached callback in background

    Declaration

    Swift

    public func inBackground() -> Promise<T>

    Return Value

    itself

  • Attachs new callback

    Declaration

    Swift

    public func onSuccess(action: (T) -> Void) -> Promise<T>

    Parameters

    action

    Callback

    Return Value

    Itself

  • Invalidates promise

    Declaration

    Swift

    public func invalidate()