-
state
internal private(set) var state: State = .Pending
===
-
result
internal private(set) var result: Result<T> = .Undefined
===
-
resolve
private var resolve: (T -> Void)?
===
-
reject
private var reject: (ErrorType -> Void)?
===
-
init(_:)
public init(_ executor: (T -> Void, ErrorType -> Void) -> Void)
===
-
init(_:)
public init(_ promise: Promise<T>)
===
-
init(_:)
public convenience init(@autoclosure(escaping) _ executor: () throws -> T)
===
-
onFulfilled(_:)
private func onFulfilled(value: T)
===
-
onRejected(_:)
private func onRejected(error: ErrorType)
===
-
then(_:_:)
private func then<U>(onFulfilled: T -> U, _ onRejected: (ErrorType -> Void)?) -> Promise<U>
===
-
then(_:_:)
public func then<U>(onFulfilled: T -> U, _ onRejected: ErrorType -> Void) -> Promise<U>
===
-
then(_:)
public func then<U>(onFulfilled: T -> U) -> Promise<U>
===
-
catch(_:)
public func `catch`(onRejected: ErrorType -> Void) -> Promise<T>
===
MARK: static
===
-
all(_:)
public static func all(promises: [Promise<T>]) -> Promise<[T]>
===
-
race(_:)
public static func race(promises: [Promise<T>]) -> Promise<T>
===
-
resolve(_:)
public static func resolve(value: T) -> Promise<T>
===
-
reject(_:)
public static func reject(error: ErrorType) -> Promise<T>
===
現状は Properties 未対応のため Methods に入っています。