@serenity-is/corelib / first
first<
TItem
>(array
,predicate
):TItem
Gets first element in an array that matches given predicate similar to LINQ's First. Throws an error if no match is found.
• TItem
TItem
[]
Array to test.
(x
) => boolean
Predicate to test elements.
TItem
First element that matches.