Skip to content

Commit

Permalink
chore(Observable): deprecate create method (#3982) (#4080)
Browse files Browse the repository at this point in the history
  • Loading branch information
dkosasih authored and benlesh committed Nov 27, 2018
1 parent cba46d5 commit 660133d
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 @@ -50,6 +50,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 @@ -45,7 +45,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 660133d

Please sign in to comment.