LazyPromise is a single-shot Observable, a lazy and cancelable promise, and a tiny alternative to Effect.

1 points•ivan7237d•8 days ago•1 comment•
I actually started LazyPromise without knowing much about Effect (https://www.effect.website/), coming from the world of RxJS and Solid-style signals (my post from last year: https://news.ycombinator.com/item?id=46321852). But Effect is a lazy promise too, and showed how useful generator syntax, type-safe errors and dependency injection can be. So there you go: a version of promise with auto-propagating cancellation and Effect-style features, but essentially the same API as the native promise.

1 comment

ivan7237d8 days ago
As an aside: isn't there something liberating about small primitives like Observable or Signal or a Promise? You're buying into an idea, not an implementation.

Read the full thread on Hacker News →

Related stories