Home > @i2analyze/notebook-sdk > data > IReadOnlyCollection > filter
data.IReadOnlyCollection.filter() method
Returns a new collection with all objects that satisfy a typeguard.
Signature:
filter<U extends V>(predicate: (v: V) => v is U): IReadOnlyCollection<U>;
Introduced: version 1.0
Type Parameters
Parameter | Type | Description |
---|---|---|
U | extends V | The type of the objects in the new collection. |
Parameters
Parameter | Type | Description |
---|---|---|
predicate | (v: V) => v is U | A predicate function to apply to each object. |
Returns:
The new collection.