@szilanor/stream
    Preparing search index...

    Variable findLastAsyncConst

    findLastAsync: <T>(
        predicate?: MaybeAsyncPredicateFunction<T>,
    ) => AsyncCollectorFunction<T, T | undefined> = lastAsync

    Type Declaration

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

        Type Parameters

        • T

          Type of items in the source.

        Parameters

        Returns AsyncCollectorFunction<T, T | undefined>

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

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