import { Component, ComponentClass, ComponentLifecycle, ReactNode } from "react"; declare namespace createReactClass { interface Mixin extends ComponentLifecycle { mixins?: Array> | undefined; statics?: { [key: string]: any; } | undefined; displayName?: string | undefined; /** * Ignored by React. * @deprecated Only kept in types for backwards compatibility. Will be removed in a futre major release. */ propTypes?: any; getDefaultProps?(): P; getInitialState?(): S; } interface ComponentSpec extends Mixin { render(): ReactNode; [propertyName: string]: any; } interface ClassicComponent

extends Component { replaceState(nextState: S, callback?: () => void): void; isMounted(): boolean; getInitialState?(): S; } interface ClassicComponentClass

extends Omit, "new"> { new(props: P, context?: any): ClassicComponent; getDefaultProps?(): P; } } declare function createReactClass( spec: createReactClass.ComponentSpec, ): createReactClass.ClassicComponentClass

; export as namespace createReactClass; export = createReactClass;