fix compilation error by introducing new method on PromiseFactory interface