 }
 
 public enum Resolution<T> {
-    case fulfilled(T), rejected(ErrorProtocol)
+    case fulfilled(T), rejected(Error)
 }

    private var state: State<T> = .pending(Handlers<T>())
    private var queue = DispatchQueue(label: "com.github.kean.Promise")
    
    public init(_ closure: @noescape (fulfill: (value: T) -> Void, reject: (error: ErrorProtocol) -> Void) -> Void) {
        closure(fulfill: { self.resolve(resolution: .fulfilled($0)) },
                reject: { self.resolve(resolution: .rejected($0)) })
    }

        state = .resolved(.fulfilled(value))
    }
    
    public init(error: Error) {
        state = .resolved(.rejected(error))
    }
    
