• Creates a push iterable with all items of the given indexed list that extend the given type.

    Type Parameters

    • T

      Indexed items type.

    • TTarget

      Target type.

    Parameters

    • indexed: IndexedItemList<T>

      A source indexed items list.

    • test: ((this, element) => element is TTarget)

      A predicate function to test that item extends the type TTarget. Returns true to keep the element, or false otherwise. It accepts the tested item as the only parameter.

        • (this, element): element is TTarget
        • Parameters

          • this: void
          • element: T

          Returns element is TTarget

    Returns PushIterable<TTarget>

    New push iterable with the elements that pass the test. If no elements passed the test, an empty iterable will be returned.

  • Creates a push iterable with all items of the given indexed list that pass the test implemented by the provided function.

    Type Parameters

    • T

      Indexed items type.

    Parameters

    • indexed: IndexedItemList<T>

      A source indexed items list.

    • test: ((this, element) => boolean)

      A predicate function to test each item. Returns true to keep the item, or false otherwise. It accepts the tested item as the only parameter.

        • (this, element): boolean
        • Parameters

          • this: void
          • element: T

          Returns boolean

    Returns PushIterable<T>

    New push iterable with the items that pass the test. If no items passed the test, an empty iterable will be returned.

Generated using TypeDoc