import { JSX, JSXElementConstructor, PropsWithChildren, ReactNode } from 'react'; /** * Function that restricts the components that can be rendered * as children. * * @param children - The children to parse. * @returns The parsed children. */ export type OnlyAllowedComponents = (children: ReactNode) => ReactNode; /** * Function that restricts the components that can be rendered * as children. * * @param children - The children to parse. * @param allowedComponents - The Set of components that are allowed. * @param SafeWrapper - Optional component to wrap the children in. * @returns The parsed children. */ export declare function onlyAllowedComponents(children: ReactNode, allowedComponents: Set, SafeWrapper?: JSXElementConstructor): ReactNode; /** * Factory function that creates a function that restricts the components * @param allowedComponents - The Set of components that are allowed. * @param SafeWrapper - Optional component to wrap the children in. * @returns The function that restricts the components. */ export declare function onlyAllowedComponentsFactory(allowedComponents: Set, SafeWrapper?: JSXElementConstructor): OnlyAllowedComponents;