3 ms·
I was happy when Promise became available, but in retrospect I'd wish we would have skipped ahead and gotten Observable (e.g: https://rxjs.dev/ https://rxjs.dev
by difosfor 4y ago
I was happy when Promise became available, but in retrospect I'd wish we would have skipped ahead and gotten Observable (e.g: https://rxjs.dev/ https://rxjs.dev/) instead to enable more powerful functionality and composition etc.
In Typescript dealing with rejection is also painful since rejection reasons can't be guaranteed to be Error even when you always take care of that. And it can't help you guarantee that you're handling all types of errors thrown. For that purpose I'm thinking of using https://github.com/supermacro/neverthrow#readme https://github.com/supermacro/neverthrow#readme or https://swan-io.github.io/boxed https://swan-io.github.io/boxed.
- swyx 4y agoboth can coexist, observable is multiple-push while promise is single-push. they have their place.