Skip to content

Commit

Permalink
fix(typings): set map function parameter for Observable.from as optional
Browse files Browse the repository at this point in the history
without this change typescript returns TS2346 error
when we use Observable.from with one parameter.

I think that it will be nice if tests will be written in typescript
because it will eliminate situations like this.
  • Loading branch information
mchmielarski authored and kwonoj committed Feb 11, 2016
1 parent 519000b commit efa4dc3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/observable/FromObservable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export class FromObservable<T> extends Observable<T> {
super(null);
}

static create<T>(ish: any, mapFnOrScheduler: Scheduler | ((x: any, y: number) => T), thisArg?: any, lastScheduler?: Scheduler): Observable<T> {
static create<T>(ish: any, mapFnOrScheduler?: Scheduler | ((x: any, y: number) => T), thisArg?: any, lastScheduler?: Scheduler): Observable<T> {
let scheduler: Scheduler = null;
let mapFn: (x: number, y: any) => T = null;
if (isFunction(mapFnOrScheduler)) {
Expand Down

0 comments on commit efa4dc3

Please sign in to comment.