-
Notifications
You must be signed in to change notification settings - Fork 3k
Closed
Description
As discussed in the ES7 Observable Spec here, the idea looks like this:
interface Observer {
subscribed((subscription: Subscription) => void): void
next((value: any) => void): void
error((err: any) => void): void
complete(() => void): void
}
Advantages:
- Actually knowing when a subscription starts (for things like
subscribeOn
) - Sets us up for backpressure handling later on.
- Becomes trivial for end-user developer to add
this.sub = subscription
in thesubscribed
handler, giving a reference tosubscription
in all other handlers without closure.
Metadata
Metadata
Assignees
Labels
No labels