-
Notifications
You must be signed in to change notification settings - Fork 3k
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
chore(Observable): deprecate create method (#3982) #4080
Conversation
@cartant I am not sure if the commit message type should be chore - do you want this changes to make it to changelog? |
Hi @cartant |
The error isn't related to your change; it's a problem with However, I'd suggest that you leave this as-is for the moment and don't apply the workaround that's mentioned in that issue. |
I was trying to figure out why is this failing. I tried dtslint on my local machine and it was fine. |
@@ -39,7 +39,9 @@ export class Subject<T> extends Observable<T> implements SubscriptionLike { | |||
super(); | |||
} | |||
|
|||
/**@nocollapse */ | |||
/**@nocollapse | |||
* @deprecated use new Subject() instead |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm. I'm not sure about this deprecation message, as this create
method does things that cannot be done with the Subject
constructor alone. Your thoughts, @benlesh ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was not very sure about this one too because the constructor signature is different. Observable one is more straight forward.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's fine. The only thing that create
did that new Observable
couldn't was allow apply
and call
, which people can get from a simple factory function.
@@ -39,7 +39,9 @@ export class Subject<T> extends Observable<T> implements SubscriptionLike { | |||
super(); | |||
} | |||
|
|||
/**@nocollapse */ | |||
/**@nocollapse | |||
* @deprecated use new Subject() instead |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's fine. The only thing that create
did that new Observable
couldn't was allow apply
and call
, which people can get from a simple factory function.
@dkosasih can you rebase, please? |
ddc4638
to
7a52531
Compare
Done 😊 |
Description: deprecate all the create method, use
new
insteadRelated issue (if exists): #3982