/** * Performs a depth-first search on a nested tree structure to find the first item matching a predicate. * * Traverses the array and nested `items` recursively, returning the first item for which * the callback returns `true`. If no item matches, returns `undefined`. * * @template T The type of items in the tree, each optionally having an `items` array of T. * @param list The array of items to search. * @param cb A callback function that receives each item and returns `true` if it matches. * @returns The first matching item or `undefined` if none is found. * * @example * const tree = [ * { id: 1, items: [{ id: 2 }, { id: 3 }] }, * { id: 4 } * ]; * const found = findDeepFirst(tree, item => item.id === 3); * // found is { id: 3 } */ export declare function findDeepFirst(list: T[], cb: (item: T) => boolean): T | undefined; //# sourceMappingURL=find-deep-first.d.ts.map