///
export declare type PropsDefaultpropsExractAndId = {
/**
* @deprecated
* The unique ID of the HOC
*
* this property can be used to get or extract the HOCs API
* from a components props or context
*
* @example
* ```ts
* const {[MyHOC.ID]: {foo, bar}, ...otherProps} = this.props
* ```
*/
ID: string;
/**
* The unique IDs of all HOCs that forms this (composed) HOC
*
* this property can be used to get or extract the HOCs API
* from a components props or context
*
* @see #ID
*/
IDs: string[];
/**
* An object containing the ID(s) of this HOC as keys and functions returning null as values
*
* May be used as React component's static 'contexTypes' value
*/
contextTypes: {
[key: string]: Function;
};
/**
* Subtracts the HOC's API from given props or context
* @returns the argument props without all keys that are part of the HOCs API
*
* @example
* ```ts
* // MyHOC provides the object 'foo' as its API
* // this.props are {bar: 'bar', foo: 'foo'}, where bar is a user-provided prop and foo is got injected by MyHOC
* MyHOC.extract(this.props) === {bar: 'bar'}
* ```
*/
extract(props: T): Exclude;
/**
* Receives the HOC's API from a react component's props or context
*
* // MyHOC provides the object 'foo' as its API
* // 'this' is a react component that was wrapped with MyHOC
*
* MyHOC.props(this) === {foo: 'foo'}
*/
props(...props: React.Component[]): CP;
/**
* Receives the HOC's API from an object
*
* // MyHOC provides the object 'foo' as its API
* // 'this' is a react component that was wrapped with MyHOC
*
* MyHOC.props(this.props) === {foo: 'foo'}
*/
props(...props: object[]): CP;
/**
* The HOC's defaultProps
*/
defaultProps?: CP;
};
export declare type HOCvoid = {
(): any;
} & PropsDefaultpropsExractAndId;
export declare type HOCOptions = {
(options: O): any;
} & PropsDefaultpropsExractAndId;
/**
* a Higher-Order-Component Function
*
* a HOC takes some options as (possible optional) single argument
* and returns another function (that also can be used as es6 class decorator)
* which takes a react component and returns a new component that
* renders the same as the *original* component but as access to the HOC's API
* via the HOC.props method
*/
export declare type HOC = {
(): any;
(options: any): any;
} & PropsDefaultpropsExractAndId;