Skip to content

Commit

Permalink
chore(Observable): deprecate create method (#3982)
Browse files Browse the repository at this point in the history
  • Loading branch information
dkosasih committed Sep 8, 2018
1 parent c1c66d2 commit 7a52531
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/internal/Observable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ export class Observable<T> implements Subscribable<T> {
* @param {Function} subscribe? the subscriber function to be passed to the Observable constructor
* @return {Observable} a new cold observable
* @nocollapse
* @deprecated use new Observable() instead
*/
static create: Function = <T>(subscribe?: (subscriber: Subscriber<T>) => TeardownLogic) => {
return new Observable<T>(subscribe);
Expand Down
4 changes: 3 additions & 1 deletion src/internal/Subject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ export class Subject<T> extends Observable<T> implements SubscriptionLike {
super();
}

/**@nocollapse */
/**@nocollapse
* @deprecated use new Subject() instead
*/
static create: Function = <T>(destination: Observer<T>, source: Observable<T>): AnonymousSubject<T> => {
return new AnonymousSubject<T>(destination, source);
}
Expand Down

0 comments on commit 7a52531

Please sign in to comment.