type RenderHookOptions = { initialProps?: TProps; }; type RenderedHook = { result: { current: HookResult | undefined; }; unmount: () => void; rerender: (props: TProps extends Record ? void : TProps) => void; }; /** * Test utility for testing hooks without creating components for them. * * Example usage: * ``` * test('should increment counter', () => { * const { result } = renderHook(() => useCounter()) * * act(() => { * result.current.increment() * }) * * expect(result.current.count).toBe(1) * }) * ``` * * @param hookInit Callback for rendering the hook * @param options Options, including the initial props to pass to the `hookInit` * callback. * @returns An object with the result/output of the hook, as well as methods to * unmount and rerender the hook (really the component holding the hook) */ export declare const renderHook: = Record>(hookInit: (props: TProps) => HookResult, { initialProps }?: RenderHookOptions) => RenderedHook; export {};