import type { Dispatch, Action } from 'redux'; import type { ComponentType } from 'react'; import type { EqualityFn, ExtendedEqualityFn } from '../types'; export declare type SelectorFactory = (dispatch: Dispatch>, factoryOptions: TFactoryOptions) => Selector; export declare type Selector = TOwnProps extends null | undefined ? (state: S) => TProps : (state: S, ownProps: TOwnProps) => TProps; export declare type MapStateToProps = (state: State, ownProps: TOwnProps) => TStateProps; export declare type MapStateToPropsFactory = (initialState: State, ownProps: TOwnProps) => MapStateToProps; export declare type MapStateToPropsParam = MapStateToPropsFactory | MapStateToProps | null | undefined; export declare type MapDispatchToPropsFunction = (dispatch: Dispatch>, ownProps: TOwnProps) => TDispatchProps; export declare type MapDispatchToProps = MapDispatchToPropsFunction | TDispatchProps; export declare type MapDispatchToPropsFactory = (dispatch: Dispatch>, ownProps: TOwnProps) => MapDispatchToPropsFunction; export declare type MapDispatchToPropsParam = MapDispatchToPropsFactory | MapDispatchToProps; export declare type MapDispatchToPropsNonObject = MapDispatchToPropsFactory | MapDispatchToPropsFunction; export declare type MergeProps = (stateProps: TStateProps, dispatchProps: TDispatchProps, ownProps: TOwnProps) => TMergedProps; interface PureSelectorFactoryComparisonOptions { readonly areStatesEqual: ExtendedEqualityFn; readonly areStatePropsEqual: EqualityFn; readonly areOwnPropsEqual: EqualityFn; } export declare function pureFinalPropsSelectorFactory(mapStateToProps: WrappedMapStateToProps, mapDispatchToProps: WrappedMapDispatchToProps, mergeProps: MergeProps, dispatch: Dispatch>, { areStatesEqual, areOwnPropsEqual, areStatePropsEqual, }: PureSelectorFactoryComparisonOptions): (nextState: State, nextOwnProps: TOwnProps) => TMergedProps; interface WrappedMapStateToProps { (state: State, ownProps: TOwnProps): TStateProps; readonly dependsOnOwnProps: boolean; } interface WrappedMapDispatchToProps { (dispatch: Dispatch>, ownProps: TOwnProps): TDispatchProps; readonly dependsOnOwnProps: boolean; } export interface InitOptions extends PureSelectorFactoryComparisonOptions { readonly shouldHandleStateChanges: boolean; readonly displayName: string; readonly wrappedComponentName: string; readonly WrappedComponent: ComponentType; readonly areMergedPropsEqual: EqualityFn; } export interface SelectorFactoryOptions extends InitOptions { readonly initMapStateToProps: (dispatch: Dispatch>, options: InitOptions) => WrappedMapStateToProps; readonly initMapDispatchToProps: (dispatch: Dispatch>, options: InitOptions) => WrappedMapDispatchToProps; readonly initMergeProps: (dispatch: Dispatch>, options: InitOptions) => MergeProps; } export default function finalPropsSelectorFactory(dispatch: Dispatch>, { initMapStateToProps, initMapDispatchToProps, initMergeProps, ...options }: SelectorFactoryOptions): (nextState: State, nextOwnProps: TOwnProps) => TMergedProps; export {};