/** * Filter values from the `ImmutableArray`. * * @tsplus static ImmutableArray.Aspects filter * @tsplus pipeable ImmutableArray filter */ export function filter( f: Refinement ): (self: ImmutableArray) => ImmutableArray export function filter(f: Predicate): (self: ImmutableArray) => ImmutableArray export function filter(f: Predicate) { return (self: ImmutableArray): ImmutableArray => new ImmutableArray(self.array.filter((a) => f(a))) }