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(typings): the return type of factory of defer should be ObservableInput<T> #3211

Merged
merged 1 commit into from
Jan 23, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/internal/observable/DeferObservable.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Observable, SubscribableOrPromise } from '../Observable';
import { Observable, ObservableInput } from '../Observable';
import { Subscriber } from '../Subscriber';
import { Subscription } from '../Subscription';

Expand Down Expand Up @@ -47,7 +47,7 @@ export class DeferObservable<T> extends Observable<T> {
*
* @see {@link create}
*
* @param {function(): SubscribableOrPromise} observableFactory The Observable
* @param {function(): ObservableInput} observableFactory The Observable
* factory function to invoke for each Observer that subscribes to the output
* Observable. May also return a Promise, which will be converted on the fly
* to an Observable.
Expand All @@ -57,11 +57,11 @@ export class DeferObservable<T> extends Observable<T> {
* @name defer
* @owner Observable
*/
static create<T>(observableFactory: () => SubscribableOrPromise<T> | void): Observable<T> {
static create<T>(observableFactory: () => ObservableInput<T> | void): Observable<T> {
return new DeferObservable(observableFactory);
}

constructor(private observableFactory: () => SubscribableOrPromise<T> | void) {
constructor(private observableFactory: () => ObservableInput<T> | void) {
super();
}

Expand All @@ -72,7 +72,7 @@ export class DeferObservable<T> extends Observable<T> {

class DeferSubscriber<T> extends OuterSubscriber<T, T> {
constructor(destination: Subscriber<T>,
private factory: () => SubscribableOrPromise<T> | void) {
private factory: () => ObservableInput<T> | void) {
super(destination);
this.tryDefer();
}
Expand Down