Closed josh closed 8 years ago
Thanks @josh! Action.js
is the result of "compiling" all the stuff from /JavaScript/common/
, /JavaScript/extension/
and /JavaScript/extension.js
using a custom XCode "build phase" (script). I'll copy these changes over to the source files and recompile things.
Action.js is the result of "compiling" all the stuff from /JavaScript/common/, /JavaScript/extension/ and /JavaScript/extension.js using a custom XCode "build phase" (script). I'll copy these changes over to the source files and recompile things.
D'oh! my bad. Hopefully this at least makes sense.
Hopefully this at least makes sense.
Definitely. Much appreciated :bow:
Silly nitpick I caught while reviewing the extension JS.
You can kinda pretend all return values within a
then
are automatically wrapped inPromise.resolve
.These two statements return the same promised wrapped
42
:Promise.resolve(42)
Promise.resolve().then(() => { return 42 })
You can also return Promise's at the end of
then()
, and it will be "flattened". So returning a typePromise
has a different effect than any other value.Promise.resolve(42)
Promise.resolve().then(() => { return Promise.resolve(Promise.resolve(42)) }).then(value => Promise.resolve(value))
.Second, instead of
reject
, you can simplythrow
inside athen()
.To sum up, inside a
then()
block, you shouldn't need to use anyPromise.***
helper.To: @mastahyeti CC: @dgraham