@szilanor/stream
    Preparing search index...

    Variable findLastIndexAsyncConst

    findLastIndexAsync: <T>(
        predicate?: MaybeAsyncPredicateFunction<T>,
    ) => AsyncCollectorFunction<T, number> = lastIndexAsync

    Type Declaration

      • <T>(
            predicate?: MaybeAsyncPredicateFunction<T>,
        ): AsyncCollectorFunction<T, number>
      • Returns a collector that returns the index of the last entry from the Iterable that satisfies the 'predicate' function.

        Type Parameters

        • T

          Type of items in the source.

        Parameters

        Returns AsyncCollectorFunction<T, number>

        Collector that returns the index of the last entry from the Iterable that satisfies the 'predicate' function.

        const result = lastIndexAsync((x) => x > 0)([1, 2, 3]);
        console.log(result); // 2