File tree Expand file tree Collapse file tree 1 file changed +7
-9
lines changed
Expand file tree Collapse file tree 1 file changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -94,20 +94,18 @@ Promiseの処理の流れが少しわかった所で、少しPromiseの状態に
9494
9595`new Promise` でインスタンス化したpromiseオブジェクトには以下の3つの状態が存在します。
9696
97- "has-resolution" - Fulfilled::
97+ Fulfilled::
9898 resolve(成功)した時。この時 `onFulfilled` が呼ばれる
99- "has-rejection" - Rejected::
99+ Rejected::
100100 reject(失敗)した時。この時 `onRejected` が呼ばれる
101- "unresolved" - Pending::
101+ Pending::
102102 resolveまたはrejectではない時。つまりpromiseオブジェクトが作成された初期状態等が該当する
103103
104- 読み方ですが、
105- 左が<<es6-promises,ES6 Promises>>の仕様で定められている名前で 、
106- 右が<<promises-aplus, Promises/A+>>で登場する状態の名前になっています 。
104+ これらの状態は<<es6-promises,ES6 Promises>>の仕様で定められている名前です。
105+ この状態をプログラムで直接触る方法は用意されていないため、書く際には余り気にしなくても問題ないですが 、
106+ Promiseについて理解するのに役に立ちます 。
107107
108- 基本的にこの状態をプログラムで直接触る事はないため、名前自体は余り気にしなくても問題ないです。
109- この書籍では、 http://promises-aplus.github.io/promises-spec/[Promises/A+] の __Pending__、__Fulfilled__ 、__Rejected__
110- を用いて解説していきます。
108+ この書籍では、__Pending__、__Fulfilled__ 、__Rejected__ の状態を用いて解説していきます。
111109
112110.promise states
113111image::img/promise-states.png[promise-states]
You can’t perform that action at this time.
0 commit comments