• Returns the elements of an array that meet the condition specified in a callback function.

    ts.filter(pred)
    

    But also works with generators.

    Type Parameters

    • T

    • U

    Parameters

    • ts: Iterable<T>

      list of things

    • pred: ((t) => t is U)

      function to check if thing is valid

        • (t): t is U
        • Parameters

          • t: T

          Returns t is U

    Returns IterableIterator<U>

    Yields

    each valid thing

Generated using TypeDoc