原帖:https://blog.csdn.net/HumorChen99/article/details/118338631
export const Sleep = (ms)=> {
return new Promise(resolve=>setTimeout(resolve, ms))
}
async test(){
console.log(1)
await Sleep(1500)
console.log(2)
}
test()
标签:功能,Typescript,console,log,resolve,Sleep,test
From: https://www.cnblogs.com/shegb1997/p/17004119.html