Helpful
    Preparing search index...

    Function firstWhere

    • Returns the first value in an argument list that matches a predicate.

      Type Parameters

      • T = any

        The type of data that will be enumerated.

      Parameters

      • predicate: (v: T | null | undefined) => boolean

        The match method against each value argument.

      • fallback: T

        The fallback value in the case that all arguments fail the predicate.

      • first: T

        The first value to check.

      • ...remaining: T[]

        The remaining values beyond the first to check.

      Returns T

      The first value for where predicate returns true for the given argument value. If first and all values of remaining fail the predicate then fallback is returned.