resolve function

Fulfill a promise