functionwait(){constp=()=>({value:newPromise(resolve=>setTimeout(()=>resolve(),3000))})letstate={next:()=>{state.next=programPartreturnp()}}functionprogramPart(){console.log('unlocked1')state.next=programPart2returnp()}functionprogramPart2(){console.log('unlocked2')console.log('it\'ssync!!')return{value:void0}}returnstate}这个函数该如何调用?
不负相思意
慕运维8079593
相关分类