@tramvai/state 2.150.0 → 2.150.1
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.
- package/lib/connect/Provider.d.ts +1 -0
- package/lib/connect/Subscription.d.ts +1 -0
- package/lib/connect/connectAdvanced.d.ts +1 -0
- package/lib/connect/context.d.ts +1 -0
- package/lib/connect/hooks/index.d.ts +1 -0
- package/lib/connect/hooks/useActions.d.ts +1 -0
- package/lib/connect/hooks/useActions.test-types.d.ts +1 -0
- package/lib/connect/hooks/useConsumerContext.d.ts +1 -0
- package/lib/connect/hooks/useEvents.d.ts +1 -0
- package/lib/connect/hooks/useEvents.test-types.d.ts +1 -0
- package/lib/connect/hooks/useIsomorphicLayoutEffect.d.ts +1 -0
- package/lib/connect/hooks/useSelector.d.ts +1 -0
- package/lib/connect/hooks/useSelector.test-types.d.ts +1 -0
- package/lib/connect/hooks/useStore.d.ts +1 -0
- package/lib/connect/hooks/useStore.test-types.d.ts +1 -0
- package/lib/connect/hooks/useStoreSelector.d.ts +1 -0
- package/lib/connect/hooks/useStoreSelector.test-types.d.ts +1 -0
- package/lib/connect/index.d.ts +1 -0
- package/lib/connect/scheduling.d.ts +1 -0
- package/lib/connect/selectorFactory.d.ts +1 -0
- package/lib/connect/toProps/mapContextToProps.d.ts +1 -0
- package/lib/connect/toProps/mapStateToProps.d.ts +1 -0
- package/lib/connect/toProps/mergeProps.d.ts +3 -2
- package/lib/connect/toProps/types.d.ts +1 -0
- package/lib/connect/toProps/wrapMapToProps.d.ts +1 -0
- package/lib/connect/types.d.ts +1 -0
- package/lib/connect/utils/verifyFunction.d.ts +1 -0
- package/lib/connect/utils/verifyMapToProps.d.ts +1 -0
- package/lib/connect/utils/verifyPlainObject.d.ts +1 -0
- package/lib/createEvent/createEvent.d.ts +2 -1
- package/lib/createEvent/createEvent.h.d.ts +1 -0
- package/lib/createReducer/createReducer.d.ts +1 -0
- package/lib/createReducer/createReducer.h.d.ts +1 -0
- package/lib/createReducer/createReducer.test-types.d.ts +1 -0
- package/lib/devTools/constants.d.ts +1 -0
- package/lib/devTools/devTools.d.ts +1 -0
- package/lib/devTools/index.d.ts +1 -0
- package/lib/devTools/middleware.d.ts +1 -0
- package/lib/dispatcher/childDispatcherContext.d.ts +1 -0
- package/lib/dispatcher/dispatcher.d.ts +1 -0
- package/lib/dispatcher/dispatcher.h.d.ts +1 -0
- package/lib/dispatcher/dispatcherContext.d.ts +1 -0
- package/lib/dispatcher/storeSubscribe.d.ts +1 -0
- package/lib/index.d.ts +1 -0
- package/lib/logger.d.ts +1 -0
- package/lib/stores/BaseStore.d.ts +1 -0
- package/lib/stores/SimpleEmitter.d.ts +1 -0
- package/lib/typings.d.ts +1 -0
- package/package.json +3 -3
|
@@ -12,3 +12,4 @@ export declare function connectAdvanced(selectorFactory: (context: ConsumerConte
|
|
|
12
12
|
schedule?: ((fn: Function) => any) | undefined;
|
|
13
13
|
pure?: boolean | undefined;
|
|
14
14
|
}): <T extends React.ComponentType<{}>>(WrappedComponent: T) => T;
|
|
15
|
+
//# sourceMappingURL=connectAdvanced.d.ts.map
|
package/lib/connect/context.d.ts
CHANGED
|
@@ -13,3 +13,4 @@ export declare function useActions<A extends Action<any, any>[]>(actions: A): {
|
|
|
13
13
|
export declare function useActions<A extends Readonly<Action<any, any>[]>>(actions: A): {
|
|
14
14
|
[Key in keyof A]: A[Key] extends Action<infer P, infer R> ? (payload?: P) => Promise<R extends PromiseLike<infer U> ? U : R> : never;
|
|
15
15
|
};
|
|
16
|
+
//# sourceMappingURL=useActions.d.ts.map
|
|
@@ -36,3 +36,4 @@ type InferStoreNameFromLegacyStore<Store extends BaseStoreConstructor<any>> = St
|
|
|
36
36
|
type InferStoreStateFromLegacyStore<Store extends BaseStoreConstructor<any>> = Store extends BaseStoreConstructor<infer State> ? State : DEFAULT_STORE_STATE;
|
|
37
37
|
type InferStoreStateFromUnknownStore<Store> = Store extends string ? DEFAULT_STORE_STATE : Store extends OptionalStoreType ? InferStoreStateFromOptionalStore<Store> : Store extends Reducer<any> ? InferStoreStateFromReducer<Store> : Store extends BaseStoreConstructor<any> ? InferStoreStateFromLegacyStore<Store> : DEFAULT_STORE_STATE;
|
|
38
38
|
export {};
|
|
39
|
+
//# sourceMappingURL=useSelector.d.ts.map
|
package/lib/connect/index.d.ts
CHANGED
|
@@ -3,3 +3,4 @@ import type { DependsOnOwnProps } from './toProps/types';
|
|
|
3
3
|
export declare function impureFinalPropsSelectorFactory(mapStateToProps: Function, mapContextToProps: Function, mergeProps: Function, context: ConsumerContext): (state: any, ownProps: any) => any;
|
|
4
4
|
export declare function pureFinalPropsSelectorFactory(mapStateToProps: DependsOnOwnProps<Function>, mapContextToProps: DependsOnOwnProps<Function>, mergeProps: DependsOnOwnProps<Function>, context: ConsumerContext, { areStatesEqual, areOwnPropsEqual, areStatePropsEqual, WrappedComponent: { defaultProps } }: any): (nextState: any, nextOwnProps: any) => any;
|
|
5
5
|
export declare function finalPropsSelectorFactory(context: ConsumerContext, { initMapStateToProps, initMapContextToProps, initMergeProps, ...options }: any): (nextState: any, nextOwnProps: any) => any;
|
|
6
|
+
//# sourceMappingURL=selectorFactory.d.ts.map
|
|
@@ -3,3 +3,4 @@ export declare function whenMapContextToPropsIsFunction(mapContextToProps: MapCo
|
|
|
3
3
|
export declare function whenMapContextToPropsIsMissing(mapContextToProps: MapContextToProps): ((context: import("@tramvai/types-actions-state-context").ConsumerContext, options: import("./wrapMapToProps").Options) => () => any) | undefined;
|
|
4
4
|
export declare function whenMapContextToPropsIsObject(mapContextToProps: MapContextToProps): ((context: import("@tramvai/types-actions-state-context").ConsumerContext, options: import("./wrapMapToProps").Options) => () => any) | undefined;
|
|
5
5
|
export declare const mapContextToPropsFactories: (typeof whenMapContextToPropsIsFunction)[];
|
|
6
|
+
//# sourceMappingURL=mapContextToProps.d.ts.map
|
|
@@ -2,3 +2,4 @@ import type { MapStateToProps } from './types';
|
|
|
2
2
|
export declare function whenMapStateToPropsIsFunction(mapStateToProps: MapStateToProps): ((context: import("@tramvai/types-actions-state-context").ConsumerContext, { displayName }: import("./wrapMapToProps").Options) => any) | undefined;
|
|
3
3
|
export declare function whenMapStateToPropsIsMissing(mapStateToProps: MapStateToProps): ((context: import("@tramvai/types-actions-state-context").ConsumerContext, options: import("./wrapMapToProps").Options) => () => any) | undefined;
|
|
4
4
|
export declare const mapStateToPropsFactories: (typeof whenMapStateToPropsIsFunction)[];
|
|
5
|
+
//# sourceMappingURL=mapStateToProps.d.ts.map
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { MergeProps } from './types';
|
|
2
|
-
export declare function whenMergePropsIsFunction(mergeProps: MergeProps): MergeProps
|
|
3
|
-
export declare function whenMergePropsIsOmitted(mergeProps: MergeProps): (() => MergeProps
|
|
2
|
+
export declare function whenMergePropsIsFunction(mergeProps: MergeProps): MergeProps | undefined;
|
|
3
|
+
export declare function whenMergePropsIsOmitted(mergeProps: MergeProps): (() => MergeProps) | undefined;
|
|
4
4
|
export declare const mergePropsFactories: (typeof whenMergePropsIsFunction)[];
|
|
5
|
+
//# sourceMappingURL=mergeProps.d.ts.map
|
|
@@ -5,3 +5,4 @@ export type DependsOnOwnProps<T> = T & {
|
|
|
5
5
|
export type MapStateToProps<T = any> = (state: Record<string, any>, ownProps: T) => any;
|
|
6
6
|
export type MapContextToProps<T = any> = ((context: ConsumerContext, ownProps: T) => any) | Record<string, Function>;
|
|
7
7
|
export type MergeProps<P = any, T = any, R = any> = (stateProps: P, contextProps: T, ownProps: R) => any;
|
|
8
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -8,3 +8,4 @@ export declare function getDependsOnOwnProps(mapToProps: Function & {
|
|
|
8
8
|
}): boolean;
|
|
9
9
|
export declare function wrapMapToPropsFunc(mapToProps: Function, methodName: string): (context: ConsumerContext, { displayName }: Options) => any;
|
|
10
10
|
export declare function wrapMapToPropsObject(actionsObject: any): (context: ConsumerContext, options: Options) => () => any;
|
|
11
|
+
//# sourceMappingURL=wrapMapToProps.d.ts.map
|
package/lib/connect/types.d.ts
CHANGED
|
@@ -41,4 +41,5 @@ export declare function createEvent<A1, A2, Payload>(description: string, payloa
|
|
|
41
41
|
*/
|
|
42
42
|
export declare function createEvent<A1, A2, A3, Payload>(description: string, payloadCreator: PayloadTransformer3<A1, A2, A3, Payload>): EventCreator3<A1, A2, A3, Payload>;
|
|
43
43
|
export declare function createEvent<Payload>(description: string, payloadCreator: PayloadTransformerN<Payload>): EventCreatorN<Payload>;
|
|
44
|
-
export declare const isEventCreator: (eventCreator: any) => eventCreator is AnyEventCreator
|
|
44
|
+
export declare const isEventCreator: (eventCreator: any) => eventCreator is AnyEventCreator;
|
|
45
|
+
//# sourceMappingURL=createEvent.d.ts.map
|
|
@@ -1 +1,2 @@
|
|
|
1
1
|
export { Event, BaseEventCreator, EmptyEventCreator, EventCreator0, EventCreator1, EventCreator2, EventCreator3, EventCreatorN, PayloadTransformer0, PayloadTransformer1, PayloadTransformer2, PayloadTransformer3, PayloadTransformerN, AnyEventCreator, AnyPayloadTransformer, EventCreators, } from '@tramvai/types-actions-state-context';
|
|
2
|
+
//# sourceMappingURL=createEvent.h.d.ts.map
|
|
@@ -8,3 +8,4 @@ interface Options<Name extends string, State, Events extends Record<string, Even
|
|
|
8
8
|
export declare function createReducer<State, Name extends string, Events extends Record<string, EventHandler<State, any>> = Record<string, EventHandler<State, any>>>(options: Options<Name, State, Events>): Reducer<State, Name, EventHandlersToEventCreators<State, Events>>;
|
|
9
9
|
export declare function createReducer<State = {}, Name extends string = string>(name: Name, initialState: State): Reducer<State, Name, never>;
|
|
10
10
|
export {};
|
|
11
|
+
//# sourceMappingURL=createReducer.d.ts.map
|
package/lib/devTools/index.d.ts
CHANGED
package/lib/index.d.ts
CHANGED
package/lib/logger.d.ts
CHANGED
package/lib/typings.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tramvai/state",
|
|
3
|
-
"version": "2.150.
|
|
3
|
+
"version": "2.150.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"typings": "lib/index.d.ts",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@tinkoff/react-hooks": "0.1.6",
|
|
21
21
|
"@tinkoff/utils": "^2.1.2",
|
|
22
|
-
"@tramvai/types-actions-state-context": "2.150.
|
|
22
|
+
"@tramvai/types-actions-state-context": "2.150.1",
|
|
23
23
|
"@types/hoist-non-react-statics": "^3.3.1",
|
|
24
24
|
"invariant": "^2.2.4",
|
|
25
25
|
"react-is": ">=17",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@reatom/core": "^1.1.5",
|
|
37
|
-
"@tramvai/core": "2.150.
|
|
37
|
+
"@tramvai/core": "2.150.1",
|
|
38
38
|
"@types/invariant": "^2.2.31",
|
|
39
39
|
"@types/react-is": "^17.0.0",
|
|
40
40
|
"@types/use-sync-external-store": "^0.0.3",
|