Call the predicate on each chunk in the queue. The first chunk to pass the predicate will be queued and the stream will be terminated.
--1--2--3--4--5--6-Xfind((x) => x === 6)-----------------6-| Copy
--1--2--3--4--5--6-Xfind((x) => x === 6)-----------------6-|
Using type guards will extract the types you want to work with.
--A--A--A--B--Xfind((x): x is B => x.type === 'b')-----------B--| Copy
--A--A--A--B--Xfind((x): x is B => x.type === 'b')-----------B--|
Generated using TypeDoc
Call the predicate on each chunk in the queue. The first chunk to pass the predicate will be queued and the stream will be terminated.