Skip to content
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

fix(ISubscription): update type definition of ISubscription::closed #2249

Merged
merged 1 commit into from
Jan 13, 2017

Conversation

kwonoj
Copy link
Member

@kwonoj kwonoj commented Jan 4, 2017

Description:

Originated from #2234, doesn't add any code changes but only update type definition for interface clarity.

Currently it's not so benefitable even for TS user since all of codebase just return Subscription everywhere instead of using interfaces, that need to be dealt with separate refactoring.

Related issue (if exists):
#2234

@coveralls
Copy link

coveralls commented Jan 4, 2017

Coverage Status

Coverage remained the same at 97.696% when pulling abd3a2a on kwonoj:chore-isubscription into 9c9870e on ReactiveX:master.

@@ -13,7 +13,7 @@ export type TeardownLogic = AnonymousSubscription | Function | void;

export interface ISubscription extends AnonymousSubscription {
unsubscribe(): void;
closed: boolean;
readonly closed: boolean;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 this will encourage TypeScript users to not try to modify this value (as it shouldn't be mutable)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@david-driscoll check #2234 as well, this PR is subset of it only updated type definition, while it does updates actual code behaviors.

@benlesh
Copy link
Member

benlesh commented Jan 5, 2017

since all of codebase just return Subscription everywhere instead of using interfaces, that need to be dealt with separate refactoring.

Technically, a LOT of the codebase returns subclasses of Subscriber. So people could call next on them if they chose too.. however, that's not supported nor is it documented.

I guess what I'm saying is: Hold off on that refactor, there's likely one coming anyhow... especially with the planned scheduling changes.

@jayphelps
Copy link
Member

jayphelps commented Jan 8, 2017

LGTM :shipit:

@kwonoj
Copy link
Member Author

kwonoj commented Jan 8, 2017

LGTM

@benlesh benlesh merged commit 0c304a2 into ReactiveX:master Jan 13, 2017
@kwonoj kwonoj deleted the chore-isubscription branch January 13, 2017 18:23
@lock
Copy link

lock bot commented Jun 6, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants