Skip to content

Commit

Permalink
Rename parameter of generate (ReactiveX#5205)
Browse files Browse the repository at this point in the history
`resultSelectorOrObservable` -> `resultSelectorOrScheduler`
  • Loading branch information
gioragutt authored and cartant committed Jan 22, 2020
1 parent e03e833 commit 6e3455d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/internal/observable/generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ export function generate<T, S>(options: GenerateOptions<T, S>): Observable<T>;
export function generate<T, S>(initialStateOrOptions: S | GenerateOptions<T, S>,
condition?: ConditionFunc<S>,
iterate?: IterateFunc<S>,
resultSelectorOrObservable?: (ResultFunc<S, T>) | SchedulerLike,
resultSelectorOrScheduler?: (ResultFunc<S, T>) | SchedulerLike,
scheduler?: SchedulerLike): Observable<T> {

let resultSelector: ResultFunc<S, T>;
Expand All @@ -349,13 +349,13 @@ export function generate<T, S>(initialStateOrOptions: S | GenerateOptions<T, S>,
iterate = options.iterate;
resultSelector = options.resultSelector || identity as ResultFunc<S, T>;
scheduler = options.scheduler;
} else if (resultSelectorOrObservable === undefined || isScheduler(resultSelectorOrObservable)) {
} else if (resultSelectorOrScheduler === undefined || isScheduler(resultSelectorOrScheduler)) {
initialState = initialStateOrOptions as S;
resultSelector = identity as ResultFunc<S, T>;
scheduler = resultSelectorOrObservable as SchedulerLike;
scheduler = resultSelectorOrScheduler as SchedulerLike;
} else {
initialState = initialStateOrOptions as S;
resultSelector = resultSelectorOrObservable as ResultFunc<S, T>;
resultSelector = resultSelectorOrScheduler as ResultFunc<S, T>;
}

return new Observable<T>(subscriber => {
Expand Down

0 comments on commit 6e3455d

Please sign in to comment.