DEV Community

Discussion on: A take on concise promise handling in TypeScript.

Collapse
 
kcvgan profile image
kcvgan

It would be possible to simply switch the return order as in [error, todo]. That way you would always return an error and checking whether something happened would be up to you. Another way would be to create an Optional generic object, something along the lines of java optionals or other language monads.
I will follow your channel and await on (🤭) your article!

Collapse
 
cubiclebuddha profile image
Cubicle Buddha

Haha I see what you did there 🤣