-
-
Notifications
You must be signed in to change notification settings - Fork 513
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ObservableLike's subscribe() return type should have unsubscribe() #278
Comments
I prefer to follow the TC39 proposal. So a |
|
@sindresorhus - Thanks. I like unsubscribe() and closed() too. I suggested making it optional because some implementations don't include it... But I prefer to follow the TC39 proposal, so will include it. This will be a flag to others that they don't implement the TC39 proposal. |
Which implementations do not provide |
Ok, let's keep the I would encourage you to open an issue on implementations without |
WRT 'closed' not existing on xstream's |
See https://github.com/sindresorhus/type-fest/blob/main/source/observable-like.d.ts#L13
Currently the
subscribe()
returnsvoid
and not the subscription. Various implementations have different interfaces for the subscription... but all seem to includeunsubscribe()
.I can submit a pull request to fix this, but wanted to check/verify there wasn't a good reason for returning
void
.An example change that points out my uncertainty/doubts about the
SubscribeResult
.Some references:
subscription.unsubscribe()
)subscribe()
returns an object withunsubscribe()
The text was updated successfully, but these errors were encountered: