异步包装
async 异步包装
将 aysnce await 错误作为返回值的处理方式
asynce load(){
const [ res, err ] = await asyncFormat( api(...) ) if(res === null){ console.log(err) return }
}
被包装promise
包装后的promise
Generated using TypeDoc
异步包装