Type alias FilterFunction<T>

FilterFunction<T>: ((value, index, array) => unknown)

Type Parameters

  • T

    The type of the elements in the array.

Type declaration

    • (value, index, array): unknown
    • Represents a filter function that is used to determine if an element should be included in a filtered array.

      Parameters

      • value: T

        The current element being evaluated.

      • index: number

        The index of the current element being evaluated.

      • array: T[]

        The array that the filter function was called upon.

      Returns unknown

      The result of the filter function evaluation: true if the element should be included, false otherwise.