Skip to content

Latest commit

 

History

History
31 lines (17 loc) · 1.08 KB

polyethylene.polyasynciterable.filter.md

File metadata and controls

31 lines (17 loc) · 1.08 KB

Home > polyethylene > PolyAsyncIterable > filter

PolyAsyncIterable.filter() method

Return an iteration of the elements of this for which func(element) returns true.

Signature:

filter<U extends T>(func: IndexedTypePredicate<T, U>): PolyAsyncIterable<U>;

Parameters

Parameter Type Description
func IndexedTypePredicate<T, U> The function to be called on all elements

Returns:

PolyAsyncIterable<U>

A new PolyAsyncIterable with only elements for which func(element) returned true and correctly narrowed to the type asserted by func

Remarks

Because the func argument is a type predicate, the result iteration will have the type asserted by func.