Content
@
0 reply
0 recast
0 reaction
@
0 reply
0 recast
0 reaction
typeof.eth 🔵
@typeof.eth
If you wanna avoid try/catch and are feeling a lil 🦀y, you can write a util to turn the data/error into a tuple. You can squeeze some really good type inference out of it too. E.g.
1 reply
0 recast
0 reaction
Justin Walsh
@thejustinwalsh.eth
Came here to say the same thing. I find it super clean to use something like https://github.com/scopsy/await-to-js, and deal with error cases up front. Shakes that happy path programmer stigma right off.
0 reply
0 recast
1 reaction