import * as React from 'react'; import { Simulate } from 'react-dom/test-utils'; export interface ControlledComponentState { value: string; } export interface ControlledComponentProps { value?: string; onChange?: (e: React.ChangeEvent) => void; [otherProps: string]: any; } export interface ControlledEventTarget extends EventTarget { value: string; } export interface ControlledChangeEvent extends React.ChangeEvent { target: ControlledEventTarget & T; } export declare const isClassExists: (element: HTMLElement, className: String) => Boolean; export declare const sleep: (ms: number) => Promise; /** @deprecated */ export declare function makeControlled(Component: React.FunctionComponent): { new (props: T): { state: { value: string; }; _onChange: (e: ControlledChangeEvent) => void; render(): React.JSX.Element; context: unknown; setState(state: ControlledComponentState | ((prevState: Readonly, props: Readonly) => ControlledComponentState | Pick | null) | Pick | null, callback?: (() => void) | undefined): void; forceUpdate(callback?: (() => void) | undefined): void; readonly props: Readonly; refs: { [key: string]: React.ReactInstance; }; componentDidMount?(): void; shouldComponentUpdate?(nextProps: Readonly, nextState: Readonly, nextContext: any): boolean; componentWillUnmount?(): void; componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void; getSnapshotBeforeUpdate?(prevProps: Readonly, prevState: Readonly): any; componentDidUpdate?(prevProps: Readonly, prevState: Readonly, snapshot?: any): void; componentWillMount?(): void; UNSAFE_componentWillMount?(): void; componentWillReceiveProps?(nextProps: Readonly, nextContext: any): void; UNSAFE_componentWillReceiveProps?(nextProps: Readonly, nextContext: any): void; componentWillUpdate?(nextProps: Readonly, nextState: Readonly, nextContext: any): void; UNSAFE_componentWillUpdate?(nextProps: Readonly, nextState: Readonly, nextContext: any): void; }; new (props: T, context: any): { state: { value: string; }; _onChange: (e: ControlledChangeEvent) => void; render(): React.JSX.Element; context: unknown; setState(state: ControlledComponentState | ((prevState: Readonly, props: Readonly) => ControlledComponentState | Pick | null) | Pick | null, callback?: (() => void) | undefined): void; forceUpdate(callback?: (() => void) | undefined): void; readonly props: Readonly; refs: { [key: string]: React.ReactInstance; }; componentDidMount?(): void; shouldComponentUpdate?(nextProps: Readonly, nextState: Readonly, nextContext: any): boolean; componentWillUnmount?(): void; componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void; getSnapshotBeforeUpdate?(prevProps: Readonly, prevState: Readonly): any; componentDidUpdate?(prevProps: Readonly, prevState: Readonly, snapshot?: any): void; componentWillMount?(): void; UNSAFE_componentWillMount?(): void; componentWillReceiveProps?(nextProps: Readonly, nextContext: any): void; UNSAFE_componentWillReceiveProps?(nextProps: Readonly, nextContext: any): void; componentWillUpdate?(nextProps: Readonly, nextState: Readonly, nextContext: any): void; UNSAFE_componentWillUpdate?(nextProps: Readonly, nextState: Readonly, nextContext: any): void; }; defaultProps: { value: string; }; contextType?: React.Context | undefined; }; export declare const reactEventTrigger: () => typeof Simulate; //# sourceMappingURL=helpers.d.ts.map