source: trip-planner-front/node_modules/rxjs/src/internal/InnerSubscriber.ts@ 8d391a1

Last change on this file since 8d391a1 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 732 bytes
Line 
1import { Subscriber } from './Subscriber';
2import { OuterSubscriber } from './OuterSubscriber';
3
4/**
5 * We need this JSDoc comment for affecting ESDoc.
6 * @ignore
7 * @extends {Ignored}
8 */
9export class InnerSubscriber<T, R> extends Subscriber<R> {
10 private index = 0;
11
12 constructor(private parent: OuterSubscriber<T, R>, public outerValue: T, public outerIndex: number) {
13 super();
14 }
15
16 protected _next(value: R): void {
17 this.parent.notifyNext(this.outerValue, value, this.outerIndex, this.index++, this);
18 }
19
20 protected _error(error: any): void {
21 this.parent.notifyError(error, this);
22 this.unsubscribe();
23 }
24
25 protected _complete(): void {
26 this.parent.notifyComplete(this);
27 this.unsubscribe();
28 }
29}
Note: See TracBrowser for help on using the repository browser.