Skip to content

Instantly share code, notes, and snippets.

@pipacs
pipacs / PromiseOperation.swift
Created December 12, 2018 21:27
An (NS)Operation wrapping a Promise
import Foundation
import PromiseKit
class PromiseOperation<T>: Operation {
var result: T? = nil
var error: Error?
var promise: Promise<T>
override var isExecuting: Bool {
get {return _isExecuting}