Beta (still building)

forkJoin

forkJoin Operator will emit an array of last value of each observable when they are finished.

Example: normal use

import { forkJoin, of, interval } from 'rxjs';
import { take } from 'rxjs/operators';

const of$ =  of(1, 2, 3, 4);
const interval$ =  interval(2000).pipe(take(2)); // should finish it
const observable = forkJoin([of$, interval$]);

Example: ⚠️⚠️⚠️ Wrong use ⚠️⚠️⚠️

import { forkJoin, of, interval } from 'rxjs';
import { take } from 'rxjs/operators';

const of$ =  of(1, 2, 3, 4);
const interval$ =  interval(2000) // should be finished ⚠️⚠️⚠️
const observable = forkJoin([of$, interval$]);

Official Doc: rxjs.forkJoin