Creates a new resolved promise.
resolve(value?)
value optional
A value to resolve the promise with.
A resolved promise.
let p = Promise.resolve("hello") p.then(value => print(value))
hello