import * as React from 'react'; /** * Gets all children by specified type or that have a descendant node in their lineage which match the specified type * * @since v2.6.0 * @template T * @template TC * @param {T} children - JSX children * @param {TC | TC[]} types - Types of children to match * @param {GetChildrenWithDescendantByTypeConfig} [config={ customTypeKey: '__TYPE' }] - The configuration params * @returns {T[]} - All children that match the specified type or have a descendant which matches the specified type * @example * // Finds all root children that are of type or have a descendant of type ToDo (custom component), div, or React Fragment * getChildrenWithDescendantByType(children, ['ToDo', 'div', 'react.fragment']); * * // Finds all root children that are of type or have a descendant of type MyComponent (custom component - full component passed in), a div, and React Fragment * import MyComponent from './MyComponent'; * getChildrenWithDescendantByType(children, [MyComponent, 'div', 'react.fragment']); * * // Finds all root children that are of type or have a descendant of type ToDo (custom component) with a customized {customTypeKey} * getChildrenWithDescendantByType(children, ['ToDo'], { customTypeKey: 'myTypeKey' }); */ export declare const getChildrenWithDescendantByType: (children: T, types: TC | TC[], { customTypeKey }?: GetChildrenWithDescendantByTypeConfig) => T[]; export declare type GetChildrenWithDescendantByTypeConfig = { customTypeKey?: string; };