docs: square odds example in rxjs guide (#24947)
Added argument type to filter function of rxjs. Fixed the return value of filtering of odd numbers PR Close #24947
This commit is contained in:
parent
bd576bb83f
commit
7c89af34a9
|
@ -8,7 +8,7 @@ const nums = of(1, 2, 3, 4, 5);
|
|||
|
||||
// Create a function that accepts an Observable.
|
||||
const squareOddVals = pipe(
|
||||
filter(n => n % 2),
|
||||
filter((n: number) => n % 2 !== 0),
|
||||
map(n => n * n)
|
||||
);
|
||||
|
||||
|
|
Loading…
Reference in New Issue