标签: javascript typescript asynchronous async-await
我正在查看以下代码here:
cache[cacheKey] = new Promise(async(resolve) => { ...
为什么在函数之前添加async?有什么区别:
async
cache[cacheKey] = new Promise((resolve) => { ...