Filters out queued chunks based on a predicate.
--1--2--3--4--5--6--7--8--9--filter((x) => x % 2 === 0)-----2-----4-----6-----8-----Using type guards will extract the types you want to work with. Copy
--1--2--3--4--5--6--7--8--9--filter((x) => x % 2 === 0)-----2-----4-----6-----8-----Using type guards will extract the types you want to work with.
--A--B--A--B---
filter((x): x is B => x.type === 'b')
-----B-----B---
Copy
Filters out queued chunks based on a predicate.