Sorry, your browser cannot access this site
This page requires browser support (enable) JavaScript
Learn more >

最近在嘗試 Kotlin/JS 的程式構建,遇到 Coroutine 和 Promise 的互相轉換問題。 Promise -> suspend func從 Promise 轉換為 suspend function 是比較簡單的。Kotlin 的 suspend function 都能通過 suspendCoroutine() 暫時掛起。給 Promise 增加一個擴展函數 ...