import * as React from 'react'; export type Act = (cb: () => Promise) => Promise; /** * Safely flush async effects when testing, simulating a legacy root. * @deprecated Import from React instead. import { act } from 'react' */ export declare const act: Act; /** * An SSR-friendly useLayoutEffect. * * React currently throws a warning when using useLayoutEffect on the server. * To get around it, we can conditionally useEffect on the server (no-op) and * useLayoutEffect elsewhere. * * @see https://github.com/facebook/react/issues/14927 */ export declare const useIsomorphicLayoutEffect: typeof React.useLayoutEffect; export declare function useMutableCallback(fn: T): React.RefObject; /** Waits for a promise in a null subtree, re-rendering the caller once it settles either way. */ export declare function useGate(): [gate: React.ReactNode, waitFor: (promise: PromiseLike) => void]; export type Bridge = React.FC<{ children?: React.ReactNode; }>; /** * Bridges Context, StrictMode, and Activity visibility from a primary renderer. */ export declare function useBridge(): Bridge; export type SetBlock = false | Promise | null; export type UnblockProps = { set: React.Dispatch>; children: React.ReactNode; }; export declare function Block({ set }: Omit): null; export declare const ErrorBoundary: { new (props: { set: React.Dispatch; children: React.ReactNode; }): { state: { error: boolean; }; componentDidCatch(err: Error): void; render(): React.ReactNode; context: unknown; setState(state: { error: boolean; } | ((prevState: Readonly<{ error: boolean; }>, props: Readonly<{ set: React.Dispatch; children: React.ReactNode; }>) => { error: boolean; } | Pick<{ error: boolean; }, K> | null) | Pick<{ error: boolean; }, K> | null, callback?: (() => void) | undefined): void; forceUpdate(callback?: (() => void) | undefined): void; readonly props: Readonly<{ set: React.Dispatch; children: React.ReactNode; }>; componentDidMount?(): void; shouldComponentUpdate?(nextProps: Readonly<{ set: React.Dispatch; children: React.ReactNode; }>, nextState: Readonly<{ error: boolean; }>, nextContext: any): boolean; componentWillUnmount?(): void; getSnapshotBeforeUpdate?(prevProps: Readonly<{ set: React.Dispatch; children: React.ReactNode; }>, prevState: Readonly<{ error: boolean; }>): any; componentDidUpdate?(prevProps: Readonly<{ set: React.Dispatch; children: React.ReactNode; }>, prevState: Readonly<{ error: boolean; }>, snapshot?: any): void; componentWillMount?(): void; UNSAFE_componentWillMount?(): void; componentWillReceiveProps?(nextProps: Readonly<{ set: React.Dispatch; children: React.ReactNode; }>, nextContext: any): void; UNSAFE_componentWillReceiveProps?(nextProps: Readonly<{ set: React.Dispatch; children: React.ReactNode; }>, nextContext: any): void; componentWillUpdate?(nextProps: Readonly<{ set: React.Dispatch; children: React.ReactNode; }>, nextState: Readonly<{ error: boolean; }>, nextContext: any): void; UNSAFE_componentWillUpdate?(nextProps: Readonly<{ set: React.Dispatch; children: React.ReactNode; }>, nextState: Readonly<{ error: boolean; }>, nextContext: any): void; }; new (props: { set: React.Dispatch; children: React.ReactNode; }, context: any): { state: { error: boolean; }; componentDidCatch(err: Error): void; render(): React.ReactNode; context: unknown; setState(state: { error: boolean; } | ((prevState: Readonly<{ error: boolean; }>, props: Readonly<{ set: React.Dispatch; children: React.ReactNode; }>) => { error: boolean; } | Pick<{ error: boolean; }, K> | null) | Pick<{ error: boolean; }, K> | null, callback?: (() => void) | undefined): void; forceUpdate(callback?: (() => void) | undefined): void; readonly props: Readonly<{ set: React.Dispatch; children: React.ReactNode; }>; componentDidMount?(): void; shouldComponentUpdate?(nextProps: Readonly<{ set: React.Dispatch; children: React.ReactNode; }>, nextState: Readonly<{ error: boolean; }>, nextContext: any): boolean; componentWillUnmount?(): void; getSnapshotBeforeUpdate?(prevProps: Readonly<{ set: React.Dispatch; children: React.ReactNode; }>, prevState: Readonly<{ error: boolean; }>): any; componentDidUpdate?(prevProps: Readonly<{ set: React.Dispatch; children: React.ReactNode; }>, prevState: Readonly<{ error: boolean; }>, snapshot?: any): void; componentWillMount?(): void; UNSAFE_componentWillMount?(): void; componentWillReceiveProps?(nextProps: Readonly<{ set: React.Dispatch; children: React.ReactNode; }>, nextContext: any): void; UNSAFE_componentWillReceiveProps?(nextProps: Readonly<{ set: React.Dispatch; children: React.ReactNode; }>, nextContext: any): void; componentWillUpdate?(nextProps: Readonly<{ set: React.Dispatch; children: React.ReactNode; }>, nextState: Readonly<{ error: boolean; }>, nextContext: any): void; UNSAFE_componentWillUpdate?(nextProps: Readonly<{ set: React.Dispatch; children: React.ReactNode; }>, nextState: Readonly<{ error: boolean; }>, nextContext: any): void; }; getDerivedStateFromError: () => { error: boolean; }; contextType?: React.Context | undefined; propTypes?: any; };