Skip to content
This repository has been archived by the owner on Apr 22, 2020. It is now read-only.

Commit

Permalink
fix(typings): the return type of factory of defer should be Observabl…
Browse files Browse the repository at this point in the history
…eInput<T> (ReactiveX#3211)
  • Loading branch information
Brooooooklyn authored and benlesh committed Jan 23, 2018
1 parent 41503e2 commit dc41a5e
Showing 1 changed file with 5 additions and 5 deletions.
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

0 comments on commit dc41a5e

Please sign in to comment.