DEV Community

loading...

Discussion on: Making Await More Functional in JavaScript

Collapse
craigmichaelmartin profile image
craig martin Author

Hm? fa takes a promise, so it's all good. In the example, saveUser is returning a promise - no try/catch necessary there. You can check out the source (12 lines) and the tests to see examples github.com/craigmichaelmartin/fawait

Collapse
seangwright profile image
Sean G. Wright

Derp! Yup, I forgot it takes a promise, even when it was shown right above saveUser returns a promise :)

Nice utility 👍

Forem Open with the Forem app