Skip to content

Commit 857311d

Browse files
committed
Fix internal TS error with TS 4.7
1 parent d595bef commit 857311d

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/components/connect.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,9 @@ function connect<
537537
displayName,
538538
wrappedComponentName,
539539
WrappedComponent,
540+
// @ts-ignore
540541
initMapStateToProps,
542+
// @ts-ignore
541543
initMapDispatchToProps,
542544
// @ts-ignore
543545
initMergeProps,

src/connect/wrapMapToProps.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { FixTypeLater } from '../types'
44
import verifyPlainObject from '../utils/verifyPlainObject'
55

66
type AnyState = { [key: string]: any }
7-
type StateOrDispatch<S = AnyState> = S | Dispatch
7+
type StateOrDispatch<S extends AnyState = AnyState> = S | Dispatch
88

99
type AnyProps = { [key: string]: any }
1010

0 commit comments

Comments
 (0)