* @extends {Ignored}
*/
class WindowSubscriber<T> extends OuterSubscriber<T, any> {
- private window: Subject<T>;
- private closingNotification: Subscription;
+ private window?: Subject<T>;
+ private closingNotification?: Subscription;
constructor(protected destination: Subscriber<Observable<T>>,
private closingSelector: () => Observable<any>) {
this.openWindow();
}
- notifyNext(outerValue: T, innerValue: any,
- outerIndex: number, innerIndex: number,
+ notifyNext(_outerValue: T, _innerValue: any,
+ _outerIndex: number, _innerIndex: number,
innerSub: InnerSubscriber<T, any>): void {
this.openWindow(innerSub);
}
- notifyError(error: any, innerSub: InnerSubscriber<T, any>): void {
+ notifyError(error: any): void {
this._error(error);
}
}
protected _next(value: T): void {
- this.window.next(value);
+ this.window!.next(value);
}
protected _error(err: any): void {
- this.window.error(err);
+ this.window!.error(err);
this.destination.error(err);
this.unsubscribeClosingNotification();
}
protected _complete(): void {
- this.window.complete();
+ this.window!.complete();
this.destination.complete();
this.unsubscribeClosingNotification();
}
}
}
- private openWindow(innerSub: InnerSubscriber<T, any> = null): void {
+ private openWindow(innerSub: InnerSubscriber<T, any> | null = null): void {
if (innerSub) {
this.remove(innerSub);
innerSub.unsubscribe();