-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
unpromiseRelated to @watchable/unpromiseRelated to @watchable/unpromise
Description
Decide whether catch handler should be wired with the semantic of promise.then().catch() or promise.catch()
At
watchable/packages/unpromise/src/unpromise.ts
Line 108 in bb7131e
| if ("catch" in thenReturn) { |
catch() returned by then() rather than wiring directly to this.promise.catch()
This is harmless given the then handler chained beforehand (which is synchronous and guaranteed to execute without error) but I recall this was a deliberate design decision from the semantics of promises, but would be good to articulate the reason, or reconsider the choice.
Metadata
Metadata
Assignees
Labels
unpromiseRelated to @watchable/unpromiseRelated to @watchable/unpromise