Skip to content

Commit 9e147ab

Browse files
volivaVictor Oliva
authored andcommitted
update collect docs to match v0.5.0
1 parent 165401c commit 9e147ab

File tree

1 file changed

+17
-11
lines changed

1 file changed

+17
-11
lines changed

docs/api/utils/collect.md

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,26 +7,32 @@ A [pipeable operator] that collects all the [`GroupedObservable`]s emitted by
77
the source and emits a `Map` with the active inner observables.
88

99
```ts
10-
function collect<K, V>(filter?: (grouped: GroupedObservable<K, V>) => Observable<boolean>):
11-
OperatorFunction<GroupedObservable<K, V>, Map<K, GroupedObservable<K, V>>>
10+
function collect<K, V>(
11+
filter?: (grouped: GroupedObservable<K, V>) => Observable<boolean>,
12+
): (
13+
source$: Observable<GroupedObservable<K, V>>,
14+
) => CollectedObservable<Map<K, GroupedObservable<K, V>>>
1215
```
1316

1417
#### Arguments
1518

16-
- `filter?`: (Optional) A function that receives the inner
17-
Observable and returns an Observable of boolean values, which indicates
19+
- `filter?`: (Optional) A function that receives the inner
20+
Observable and returns an Observable of boolean values, which indicates
1821
whether the inner Observable should be collected. Default: `undefined`.
1922

2023
#### Returns
2124

22-
[`OperatorFunction<GroupedObservable<K, V>, Map<K, GroupedObservable<K, V>>>`][OperatorFunction]: An Observable that
23-
emits a `Map` containing all the keys seen in the source grouped Observables so far, along with the grouped Observable
24-
for matches each key.
25+
`CollectedObservable<Map<K, GroupedObservable<K, V>>>` - An Observable that:
26+
27+
- Emits a `Map` containing all the keys seen in the source grouped Observables
28+
so far, along with the grouped Observable for matches each key.
29+
- Has a function `.get(key: K): Observable<V>` that returns the Observable
30+
that matches the key parameter.
2531
2632
## See also
27-
* [`collectValues()`](collectValues)
28-
* [`split(keySelector)`](split)
33+
34+
- [`collectValues()`](collectValues)
35+
- [`split(keySelector)`](split)
2936
3037
[pipeable operator]: https://rxjs.dev/guide/v6/pipeable-operators
31-
[`GroupedObservable`]: https://rxjs.dev/api/index/class/GroupedObservable
32-
[OperatorFunction]: https://rxjs.dev/api/index/interface/OperatorFunction
38+
[`groupedobservable`]: https://rxjs.dev/api/index/class/GroupedObservable

0 commit comments

Comments
 (0)