anu-verzum 1.13.0 → 1.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -6,8 +6,8 @@ type StoreShape = {
|
|
|
6
6
|
subscribe: (listener: () => void) => void;
|
|
7
7
|
unsubscribe: (listener: () => void) => void;
|
|
8
8
|
};
|
|
9
|
-
type MapStateToProps<TState = any, TOwnProps extends
|
|
10
|
-
type MapDispatchToProps<TDispatch = any, TOwnProps extends
|
|
9
|
+
type MapStateToProps<TState = any, TOwnProps extends Record<string, any> = Record<string, any>, TStateProps extends Record<string, any> = Record<string, any>> = (state: TState, ownProps: TOwnProps) => TStateProps;
|
|
10
|
+
type MapDispatchToProps<TDispatch = any, TOwnProps extends Record<string, any> = Record<string, any>, TDispatchProps extends Record<string, any> = Record<string, any>> = (dispatch: TDispatch, ownProps: TOwnProps) => TDispatchProps;
|
|
11
11
|
export interface ConnectorProviderProps extends Props {
|
|
12
12
|
store: StoreShape;
|
|
13
13
|
}
|
|
@@ -17,7 +17,7 @@ declare class Provider extends Component<ConnectorProviderProps> {
|
|
|
17
17
|
render(): AnuElement | AnuElement[] | null;
|
|
18
18
|
}
|
|
19
19
|
declare const Connector: {
|
|
20
|
-
connect: <TState = any, TOwnProps extends
|
|
20
|
+
connect: <TState = any, TOwnProps extends Record<string, any> = Record<string, any>, TStateProps extends Record<string, any> = Record<string, any>, TDispatchProps extends Record<string, any> = Record<string, any>>(mapStateToProps?: MapStateToProps<TState, TOwnProps, TStateProps> | null, mapDispatchToProps?: MapDispatchToProps<any, TOwnProps, TDispatchProps> | null) => (WrappedComponent: ComponentConstructor<TStateProps & TDispatchProps & TOwnProps>) => ComponentConstructor;
|
|
21
21
|
Provider: typeof Provider;
|
|
22
22
|
};
|
|
23
23
|
export default Connector;
|
package/dist/index.d.ts
CHANGED
|
@@ -93,7 +93,7 @@ declare const Anu: {
|
|
|
93
93
|
Provider: ({ locale, messages, defaultLocale, children }: import("./core/components/Intl").IntlProviderProps) => AnuElement | null;
|
|
94
94
|
};
|
|
95
95
|
Connector: {
|
|
96
|
-
connect: <TState = any, TOwnProps extends
|
|
96
|
+
connect: <TState = any, TOwnProps extends Record<string, any> = Record<string, any>, TStateProps extends Record<string, any> = Record<string, any>, TDispatchProps extends Record<string, any> = Record<string, any>>(mapStateToProps?: ((state: TState, ownProps: TOwnProps) => TStateProps) | null, mapDispatchToProps?: ((dispatch: any, ownProps: TOwnProps) => TDispatchProps) | null) => (WrappedComponent: import("./core/elements").ComponentConstructor<TStateProps & TDispatchProps & TOwnProps>) => import("./core/elements").ComponentConstructor;
|
|
97
97
|
Provider: {
|
|
98
98
|
new (props: import("./core/components/Connector").ConnectorProviderProps, context?: Record<string, any>): {
|
|
99
99
|
store: {
|
|
@@ -136,7 +136,7 @@ declare const Anu: {
|
|
|
136
136
|
deepEqual: (object1: Record<string, any>, object2: Record<string, any>) => boolean;
|
|
137
137
|
};
|
|
138
138
|
};
|
|
139
|
-
export type { AnuElement, AnuChild, Props, Ref, FunctionComponent, ElementType } from './core/elements';
|
|
139
|
+
export type { AnuElement, AnuChild, AnuNode, Props, Ref, FunctionComponent, ElementType } from './core/elements';
|
|
140
140
|
export type { ContextValue, ConsumerProps } from './core/components/Context';
|
|
141
141
|
export type { Action, ThunkAction, Dispatch, Reducer, MiddlewareAPI, Middleware, Store, SelectorFn, CreateSelectorFn } from './store/store';
|
|
142
142
|
export type { ApiSuccessResponse, ApiErrorResponse } from './server-api/server-api';
|
package/package.json
CHANGED