Get to know MDN better
此頁面由社群從英文翻譯而來。了解更多並加入 MDN Web Docs 社群。
This feature is well established and works across many devices and browser versions. It’s been available across browsers since 2015年7月.
Promise.resolve(value) 方法回傳一個以 value 判定結果的 Promise 物件。若 value 是個 thenable(例如,具有 then() 方法,則回傳的 promise 將依其結果採取其最終狀態;若 value 是 promise,則作為呼叫 Promise.resolve 之結果;其他情形都將回傳以 value 實現的 promise。
將被 Promise 實現的引數(argument)。可以是個 Promise 或待解決的 thenable。
以 value 或作為 value 的 promise 解決的 Promise。
靜態函式 Promise.resolve 回傳判定後的 Promise。
由於 handler 是非同步地被調用而導致相反的紀錄順序。經由這篇文章了解 then 如何運作。
| ECMAScript® 2027 Language Specification # sec-promise.resolve |
Enable JavaScript to view this browser compatibility table.
This page was last modified on 2025年7月14日 by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.