source: trip-planner-front/node_modules/rxjs/src/internal/util/subscribeToResult.ts@ 188ee53

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

initial commit

  • Property mode set to 100644
File size: 1.1 KB
Line 
1import { Subscription } from '../Subscription';
2import { InnerSubscriber } from '../InnerSubscriber';
3import { OuterSubscriber } from '../OuterSubscriber';
4import { Subscriber } from '../Subscriber';
5import { subscribeTo } from './subscribeTo';
6import { Observable } from '../Observable';
7
8export function subscribeToResult<T, R>(
9 outerSubscriber: OuterSubscriber<T, R>,
10 result: any,
11 outerValue: undefined,
12 outerIndex: undefined,
13 innerSubscriber: InnerSubscriber<T, R>
14): Subscription | undefined;
15
16export function subscribeToResult<T, R>(
17 outerSubscriber: OuterSubscriber<T, R>,
18 result: any,
19 outerValue?: T,
20 outerIndex?: number
21): Subscription | undefined;
22
23export function subscribeToResult<T, R>(
24 outerSubscriber: OuterSubscriber<T, R>,
25 result: any,
26 outerValue?: T,
27 outerIndex?: number,
28 innerSubscriber: Subscriber<R> = new InnerSubscriber(outerSubscriber, outerValue, outerIndex)
29): Subscription | undefined {
30 if (innerSubscriber.closed) {
31 return undefined;
32 }
33 if (result instanceof Observable) {
34 return result.subscribe(innerSubscriber);
35 }
36 return subscribeTo(result)(innerSubscriber) as Subscription;
37}
Note: See TracBrowser for help on using the repository browser.