 {
     // MARK: - Type
 
-    public typealias NextType = Promise<Any>
+    public typealias NextType = Promise<Any?>
     public typealias ValueType = V
     public typealias ReasonType = NSError
 

        
        self.onFulfilled(value)
    }
/*
    func resolve(#promise: Promise)
    {
        if self.state != .Pending {
            return
        }

        if promise === self {
            self.onRejected(NSError.aPlusPromiseTypeError())    // TODO: Replace aPlusPromiseTypeError
        }
        else {
            promise.then(
                onFulfilled: { (value) -> Void in
                    self.onFulfilled(value)
                },
                onRejected: { (reason) -> Void in
                    self.onRejected(reason)
                }
            )
        }
    }
    */
    
    func resolve<T: Thenable where T.ValueType == V, T.ReasonType == NSError>(#thenable: T)
    {
        if self.state != .Pending {
            return
        }
        
        thenable.then(

        case let value as V:
            self.resolve(value: value)
        default:
            self.onFulfilled(some! as V) // TODO: Type Error
        }
    }
    
