Promise API is typed