effect
effect copied to clipboard
Better error handling for `T.tryCatchPromise` in case there is a sync error
TODO: Better description
T.tryCatchPromise(
() => {
throw new Error('nooo')
},
(err) => {
console.log('err', err) // Never gets called
return err
},
)
T.tryCatchPromise(
async () => {
throw new Error('nooo')
},
(err) => {
console.log('err', err) // Works
return err
},
)
Solved in main for next, need to backport