Skip to content

Commit

Permalink
docs(forkJoin): add example of empty array (#5322)
Browse files Browse the repository at this point in the history
* docs(forkJoin): add example of empty array

* break lines when longer than 150

* fix trailing whitespace
  • Loading branch information
robstoll authored Feb 22, 2020
1 parent f618162 commit 5cf26e7
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/internal/observable/forkJoin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,14 @@ export function forkJoin<T>(...sources: ObservableInput<T>[]): Observable<T[]>;
* an {@link Observable} that emits either an array of values in the exact same order as the passed array,
* or a dictionary of values in the same shape as the passed dictionary.
*
* <span class="informal">Wait for Observables to complete and then combine last values they emitted.</span>
* <span class="informal">Wait for Observables to complete and then combine last values they emitted;
* complete immediately if an empty array is passed.</span>
*
* ![](forkJoin.png)
*
* `forkJoin` is an operator that takes any number of input observables which can be passed either as an array
* or a dictionary of input observables. If no input observables are provided, then the resulting stream will complete
* immediately.
* or a dictionary of input observables. If no input observables are provided (e.g. an empty array is passed),
* then the resulting stream will complete immediately.
*
* `forkJoin` will wait for all passed observables to emit and complete and then it will emit an array or an object with last
* values from corresponding observables.
Expand Down

0 comments on commit 5cf26e7

Please sign in to comment.