import type { UnknownFunction } from "src/types"; /** * Retrieves a function from a module by searching its source code for a specific match. * @template T The expected type of the function to be returned. * @param module The module to search within. This can be any object or structure containing functions. * @param match The pattern to match the function's source code. * @returns The first function that matches the given pattern, or `undefined` if no match is found. */ export declare function getFunctionBySource(module: unknown, match: string | RegExp | ((func: UnknownFunction) => boolean)): T | undefined; /** * Retrieves the key of a function within a module that matches a given source pattern. * @template T The type of the module object. * @param module The module object to search within. * @param match The pattern to match the function's source code. * @returns The key of the matching function as a string, or `undefined` if no match is found. */ export declare function getFunctionKeyBySource(module: T, match: string | RegExp | ((func: UnknownFunction) => boolean)): Extract | undefined; /** * Retrieves a component from a module by searching its source code for a specific match. * Can search for normal components as well as those wrapped in `React.memo` or `React.forwardRef`. * @template T The expected type of the component to be returned. * @param module The module to search within. * @param match The pattern to match the source against. * @returns The first component that matches the given pattern, or `undefined` if no match is found. */ export declare function getComponentBySource(module: unknown, match: string | RegExp | ((func: UnknownFunction) => boolean)): T | undefined;