/** * Provides an abstraction over react 17 and 18 compatible libraries */ import type { Queries, waitForOptions, RenderHookOptions } from '@testing-library/react'; import type { act as reactAct } from 'react-dom/test-utils'; export declare const renderHook: RenderHook; export default renderHook; export declare const act: typeof reactAct extends undefined ? (callback: () => void) => void : typeof reactAct; export type { RenderHookOptions } from '@testing-library/react'; type RenderHook = (render: (initialProps: Props) => Result, options?: RenderHookOptions) => RenderHookResult; export interface RenderHookResult { /** * Triggers a re-render. The props will be passed to your renderHook callback. */ rerender: (props?: Props) => void; /** * This is a stable reference to the latest value returned by your renderHook * callback */ result: { /** * The value returned by your renderHook callback */ current: Result; error?: Error; }; /** * Unmounts the test component. This is useful for when you need to test * any cleanup your useEffects have. */ unmount: () => void; waitForNextUpdate: (options?: waitForOptions) => Promise; waitFor(callback: () => Promise | T, options?: waitForOptions): Promise; } //# sourceMappingURL=renderHook.d.cts.map