Added support for typed promises.