Show HN: LazyPromise = Observable – Signals (github.com)
A Promise-like primitive which is lazy/cancelable, has typed errors, and emits synchronously instead of on the microtask queue. In a way LazyPromise is what you get if you take an Observable and make it impossible to misuse it for what the Signals were built to do.
10 comments
[ 0.23 ms ] story [ 31.1 ms ] threadKind of reminds me of https://doc.rust-lang.org/rust-by-example/trait/drop.html
The two separate failure channels turn me off. Is this practical or does it introduce unwanted complexity in most cases?
Also wondering what are the Signals that are mentioned.
About the two error channels: what I tried to do is to make it really easy to not use typed errors when you don't need them. In that case your promise is typed as `LazyPromise<Value, never>`.
Signals is a reactive primitive that has been initially introduced in SolidJS framework and have then made their way to other frameworks like Angular.