react-redux
Advanced tools
Comparing version 8.0.4 to 8.0.5
@@ -54,2 +54,4 @@ import type { Store } from 'redux'; | ||
<TStateProps = {}, TDispatchProps = {}, TOwnProps = {}, State = DefaultState>(mapStateToProps: MapStateToPropsParam<TStateProps, TOwnProps, State>, mapDispatchToProps: MapDispatchToPropsNonObject<TDispatchProps, TOwnProps>): InferableComponentEnhancerWithProps<TStateProps & TDispatchProps, TOwnProps>; | ||
/** mapState and mapDispatch (nullish) */ | ||
<TStateProps = {}, TDispatchProps = {}, TOwnProps = {}, State = DefaultState>(mapStateToProps: MapStateToPropsParam<TStateProps, TOwnProps, State>, mapDispatchToProps: null | undefined): InferableComponentEnhancerWithProps<TStateProps, TOwnProps>; | ||
/** mapState and mapDispatch (as an object) */ | ||
@@ -56,0 +58,0 @@ <TStateProps = {}, TDispatchProps = {}, TOwnProps = {}, State = DefaultState>(mapStateToProps: MapStateToPropsParam<TStateProps, TOwnProps, State>, mapDispatchToProps: MapDispatchToPropsParam<TDispatchProps, TOwnProps>): InferableComponentEnhancerWithProps<TStateProps & ResolveThunks<TDispatchProps>, TOwnProps>; |
import { Context, ReactNode } from 'react'; | ||
import { ReactReduxContextValue } from './Context'; | ||
import { Action, AnyAction, Store } from 'redux'; | ||
export interface ProviderProps<A extends Action = AnyAction, S = any> { | ||
export interface ProviderProps<A extends Action = AnyAction, S = unknown> { | ||
/** | ||
@@ -21,3 +21,3 @@ * The single Redux store in your application. | ||
} | ||
declare function Provider<A extends Action = AnyAction>({ store, context, children, serverState, }: ProviderProps<A>): JSX.Element; | ||
declare function Provider<A extends Action = AnyAction, S = unknown>({ store, context, children, serverState, }: ProviderProps<A, S>): JSX.Element; | ||
export default Provider; |
@@ -75,4 +75,5 @@ import { ClassAttributes, ComponentClass, ComponentType, FunctionComponent } from 'react'; | ||
export interface TypedUseSelectorHook<TState> { | ||
<TSelected>(selector: (state: TState) => TSelected, equalityFn?: EqualityFn<TSelected>): TSelected; | ||
<TSelected>(selector: (state: TState) => TSelected, equalityFn?: EqualityFn<NoInfer<TSelected>>): TSelected; | ||
} | ||
export declare type NoInfer<T> = [T][T extends any ? 0 : never]; | ||
export {}; |
{ | ||
"name": "react-redux", | ||
"version": "8.0.4", | ||
"version": "8.0.5", | ||
"description": "Official React bindings for Redux", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -5,3 +5,3 @@ import { useContext, useDebugValue } from 'react' | ||
import { ReactReduxContext } from '../components/Context' | ||
import type { EqualityFn } from '../types' | ||
import type { EqualityFn, NoInfer } from '../types' | ||
import type { uSESWS } from '../utils/useSyncExternalStore' | ||
@@ -36,3 +36,3 @@ import { notInitialized } from '../utils/useSyncExternalStore' | ||
selector: (state: TState) => Selected, | ||
equalityFn: EqualityFn<Selected> = refEquality | ||
equalityFn: EqualityFn<NoInfer<Selected>> = refEquality | ||
): Selected { | ||
@@ -39,0 +39,0 @@ if (process.env.NODE_ENV !== 'production') { |
@@ -168,4 +168,6 @@ import { | ||
selector: (state: TState) => TSelected, | ||
equalityFn?: EqualityFn<TSelected> | ||
equalityFn?: EqualityFn<NoInfer<TSelected>> | ||
): TSelected | ||
} | ||
export type NoInfer<T> = [T][T extends any ? 0 : never] |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
313906
6534