diff --git a/src/Observable.ts b/src/Observable.ts index 58ed363056..2502c755b9 100644 --- a/src/Observable.ts +++ b/src/Observable.ts @@ -141,7 +141,7 @@ export default class Observable implements CoreOperators { static fromEvent: (element: any, eventName: string, selector: (...args:Array) => T) => Observable; static fromEventPattern: (addHandler: (handler:Function)=>void, removeHandler: (handler:Function) => void, selector?: (...args:Array) => T) => Observable; static fromPromise: (promise: Promise, scheduler?: Scheduler) => Observable; - static interval: (interval: number) => Observable; + static interval: (interval: number, scheduler?: Scheduler) => Observable; static merge: (...observables:any[]) => Observable; static never: () => Observable; static of: (...values: (T | Scheduler)[]) => Observable; diff --git a/src/observables/IntervalObservable.ts b/src/observables/IntervalObservable.ts index abc2836eb1..4cc2da26b7 100644 --- a/src/observables/IntervalObservable.ts +++ b/src/observables/IntervalObservable.ts @@ -5,7 +5,7 @@ import nextTick from '../schedulers/nextTick'; export default class IntervalObservable extends Observable { - static create(period: number = 0, scheduler: Scheduler = nextTick) { + static create(period: number = 0, scheduler: Scheduler = nextTick): Observable { return new IntervalObservable(period, scheduler); }