Reputation: 55729
What is the canonical way to create a resolved promise in ES 2015?
Upvotes: 51
Views: 7072
Reputation: 2408
The Promise.resolve
class method returns a promise that is instantiated as resolved with a value you can specify:
var promise = Promise.resolve(100);
Upvotes: 66