Skip to content

Commit

Permalink
refactor(switchMap): clarify 'any' types which are used in SwitchMapS…
Browse files Browse the repository at this point in the history
…ubscriber (#1751)

* refactor(switchMap): make SwitchMapSubscriber._tryNotifyNext() private

* refactor(switchMap): clarify 'any' types which are used in SwitchMapSubscriber
  • Loading branch information
Tetsuharu OHZEKI authored and kwonoj committed Jun 10, 2016
1 parent 01df713 commit f5f0180
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/operator/switchMap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class SwitchMapSubscriber<T, I, R> extends OuterSubscriber<T, I> {
}

protected _next(value: T) {
let result: any;
let result: ObservableInput<I>;
const index = this.index++;
try {
result = this.project(value, index);
Expand All @@ -101,7 +101,7 @@ class SwitchMapSubscriber<T, I, R> extends OuterSubscriber<T, I> {
this._innerSub(result, value, index);
}

private _innerSub(result: any, value: T, index: number) {
private _innerSub(result: ObservableInput<I>, value: T, index: number) {
const innerSubscription = this.innerSubscription;
if (innerSubscription) {
innerSubscription.unsubscribe();
Expand Down Expand Up @@ -138,8 +138,8 @@ class SwitchMapSubscriber<T, I, R> extends OuterSubscriber<T, I> {
}
}

_tryNotifyNext(outerValue: T, innerValue: I, outerIndex: number, innerIndex: number): void {
let result: any;
private _tryNotifyNext(outerValue: T, innerValue: I, outerIndex: number, innerIndex: number): void {
let result: R;
try {
result = this.resultSelector(outerValue, innerValue, outerIndex, innerIndex);
} catch (err) {
Expand Down

0 comments on commit f5f0180

Please sign in to comment.