有时需要将现有对象转为Promise对象,Promise.resolve( )方法就起到这个作用 Promise.resolve(‘foo’) // 等价于 new Promise(resolve = ...

关注我们的公众号

微信公众号